How migration works on Frappe Framework?

Hey y’all…

Let’s assume I have one DocType, it’s already deployed in production… but now I need to add one new Field on this doctype and/or add new DocTypes…

How migration works on Frappe? There’s any command to generate this migration?

Thanks!

You can run this Bench command:

bench migrate

This will compare the DocType schema, versus what’s actually in SQL, and add/modify columns as needed

(note: for safety reasons, it does not remove SQL columns)

1 Like

Thank you!