As a new Odoo user and developer, my set-up was the main branch is in the staging environment and production branch is in the production. I am actually developing locally then remotely push to the main/staging environment. I will run some test there and also change some configuration using the Studio.
After successful tests, I am now ready to move the code to production. What I do was backup the staging database, Exact dump and with firestore. Then in the local production branch, I merge the main branch. Then I will import the backup, basically the staging environment and production environment having the same code and database.
I am still in development mode so this is alright, but when it is really in production with data, this procedure is not correct since it will rewrite the live data. What is the correct way to update the code and some database values? I import the database since the changes using in Studio are stored in the database.