Changes to customised form not reflected in .json?


If I make changes to DocType Contact, the changes will be recorded in contact.json.

I’m using Customise Form to make changes to DocType Contact’s original DocField and added my own new DocFields. Those changes aren’t recorded in contact.json.

How do I “bench migrate” in this case?

When using the “Customize” button, the changes you make are saved in the SQL database; nothing changes in the .json schema files.


Thank you @brian_pond !

I’m developer mode, do you know “bench migrate” using json files would delete columns in db?

The “bench migrate” command never Deletes tables and columns. It can only Create/Edit.

If you want to clean up leftover SQL tables and columns that no longer exist in the .json files? Check out these commands (version 14+ only)


@brian_pond oh, when I think further, all changes to Customise Form cannot be migrated, right?

If you’re using your own App? That is supported.

  • You can export those Customize Forms changes to a file, which is saved in your App’s directory. (screenshot)
  • Alternately, you could also leverage Fixtures in `’. (I’m not very familiar with those)

Otherwise, if you don’t have a custom App? You would probably have to export/import the actual SQL tables that contain the customized data:

  • tabCustom Field
  • tabCustom Doc Perm

I’ve never done that, but I don’t see why it’s not possible. They are ordinary SQL tables. After you migrated those 2 tables between environments, you might need to run bench migrate to trigger any downstream schema changes to the DocTypes you customized.

1 Like

Wow, much appreciated Brian.

This is becoming madness… there are too many steps to handle when doing migration.

I have my own Apps, so I’ll try the first method first. Lots of checking on the DB side.

Just wanting to be sure, from your experience, as Customer is a generic DocType, under which App would save the changes if you have multiple Apps?

I guess the remaining steps if I go Export is:

  • … other .json files to copy over to new instance
  • copy the changes (as a file) to new instance
  • bench migrate
  • check check check

What do you think?