Hi, I have edited some frappe json files (customize_form_field.json, docfield.json, custom_field.json) to add some custom data types and made relevant changes in js files. On my local machine, when I run
bench migrate
bench build
bench build --app frappe
bench clear-cache
bench restart
These changes appear on my system but when I do the same for production server, the json files are not updating. js compiles fine but added field types in json are not showing up.
What can I do to remedy this situation?
When you run a 'bench migrate'
command, 2 schemas are compared:
- The schema defined in the JSON files.
- The schema defined in SQL tables
DocType
and DocField
To determine which one “wins”, Bench compares their “modified
” datetime values.
If you manually edit a JSON schema file, you must increase the value of “modified” to something newer than the value in the SQL tables. Otherwise, your JSON will be ignored.
You only need to edit this value if you manually edit the JSON files.
When making changes through the browser, the value is incremented for you automatically.
3 Likes
You sir are a saint. Thank you very much.