Roshan888
Roshan888

Reputation: 41

How to properly delete a custom doctype in Frappe/ERP Next

What is the correct approach to delete custom doctype in Frappe? How to migrate the same in other servers and also what about database tables? Do we need to manually drop them?

Currently for me the deleted doctype’s still persist in the server after bench migrate. Please can someone help me in this?

Upvotes: 3

Views: 2340

Answers (2)

TKramer
TKramer

Reputation: 3

In my experience you best don't bother with the tables in the database. Let Frappe keep track of this, don't interfere by dropping tables or altering tables.

Look at it like this: If you are using a database system you don't bother what the database system does on the filesystem to organize itself. If you are using Frappe you don't bother what Frappe does in the database system to organize itself.

When it comes to deploying your Doctypes on the next stage (QS, Production) you use "bench export-fixtures" to export and "bench migrate" to import your changes into your targeted Stage. Don't create your own SQL-Scripts!

Upvotes: 0

Chillar Anand
Chillar Anand

Reputation: 29514

When you delete a custom doctype, it will just delete the entry from doctype table. Also, there is a doctype called Deleted Document. All the deleted doctypes will be tracked here automatically.

By default, Frappe doesn't drop the tables from database. If you are sure that you don't need that data, you can manually drop those changes.

Upvotes: 1

Related Questions