How to Migrate ERPNext Customizations from Development to Production Environments

Hi Frappe Community,

How can I effectively migrate changes made to ERP Next 15 from a development server (named ‘45’) to a production server (named ‘30’) without affecting existing data?

In the development environment (server ‘45’), I’m making modifications to ERP Next 15 using the “edit doctypes” and “add doctypes” features. These changes are stored in a backup file format like “20240305_174638-aalamerp_com-database.sql.gz”, alongside mock data created during development.

However, when attempting to transfer these changes to the production server (‘30’), I encounter challenges. The database file containing the changes also includes mock data, making it difficult to isolate and apply only the necessary modifications without affecting existing production data. Additionally, when I restore the backed-up database from development and restore it in production, the data in the development environment appears in the production environment, overriding the existing production data.

How can I ensure that only the changes made in the development environment are transferred to the production server without impacting existing data? Additionally, how can I prevent the transfer of mock data and ensure that the production server retains its existing data?