I would like to discuss how to deploy new DocTypes with a combination of “bench export-fixtures” and “bench migrate”
We created an application called “erpituc”.
We use three instances of frappe-bench as Development, Test & Production.
In Production developer_mode is disabled in common_site_config.json
Frappe 13.18.0 and Bench 5.6.0 are used.
We created a new DocType in stage Development with these settings:
Then we used “bench export-fixtures” to create fixtures/doctype.json describing the new DocType.
fixtures/doctype.json was transfered to the stages Test & Production.
There “bench migrate” was used to create the new DocType.
In Production this error-message occured:
Updating DocTypes for frappe : [========================================] 100% Updating DocTypes for erpnext : [========================================] 100% Updating DocTypes for erpituc : [========================================] 100% Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main ... File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 372, in _raise_exception raise raise_exception(msg) frappe.core.doctype.doctype.doctype.CannotCreateStandardDoctypeError: Not in Developer Mode! Set in site_config.json or make 'Custom' DocType.
Seeing this, we temporary enabled developer_mode on Production and were able to create the new DocType.
But fiddling with developer_mode on Production just for this purpose seems a little awkward, as does making the DocType ‘Custom’.
How do you approach this in your applications?