Moving from Development to Production and deploying a newer Production version

I'm about to deploy my first web-app (not Shopify) and just wanted any advice on pitfalls. The docs say that the databases will be migrated but is not specific that I will not lose my development model data. Also if I then further improve the app which I will do in a development environment, thus with fresh data, and deploy v2 it looks like there is DB migration again so I assume it merges the production and development DBs.
Is this correct and has anyone hit any unforseen snags with data or anything else for that matter. I've read the docs https://docs.gadget.dev/guides/environments/deployment#deploying-changes-to-production and it seems pretty clear but experience has taught me better to ask. The CI/CD pipeline after first deployment is more crucial as by then I will have client data. Thaks in advance.
3 Replies
Smelvin
Smelvin2mo ago
Hi Stevie, When pushing from Development to production the data from development will not migrate to the production database. For example if I added a bunch of test data into my dev environment then I pushed to production that test data will not go to the productions database
stevied9460
stevied9460OP2mo ago
Thanks Mark. What happens when you deploy updated code. Same thing? You could have a year of customer data. I can see you can download the data as CSV but you would have to code out a tool to re-load the csv's. From my understanding you cannot cross-read or cross-write data between any two environments.
Smelvin
Smelvin2mo ago
The data in production will stay in production. and you are correct that you cant cross-read/write between environments. You would need to set up your own connection to transfer data between both environments.

Did you find this page helpful?