October 14, 2024 at 9:24 pm
We have a Production/Live version with up-to-date data and a Test version with older data where we have added new columns to tables and created new tables.
Now, we need to add these new columns to the existing Prod tables and add the new tables we created to the Prod environment. What's the best approach to do this?
I know we need to take a backup of the Prod database. Then, tell the users to log out of Production so we can cut over. We want the LIVE data, but somehow, we must add the additional columns. One thought was to only move the structure to the Prod version. But the Test structure is a little different from the Prod environment.
Some of the columns in TEST are dropdowns with data that we linked to the ID field in the Test environment to populate those columns. I guess we need to do the same for Production.
Has anyone done this? Please help me with the best plan/approach steps to get this done.
Thank you.
JP
October 15, 2024 at 8:16 pm
We have a Production/Live version with up-to-date data and a Test version with older data where we have added new columns to tables and created new tables.
All this should have been scripted when you did the changes in Test. The scripts can then just be applied to production as needed.
If you do not have scripts, you can use schema compare tools to generate them. You can also create a script for the data in your dropdowns.
October 16, 2024 at 12:20 pm
If your databases are fully source-controlled, it should be possible to simply deploy them from the relevant branch. The act of deploying will take care of most of the DDL changes (but might fail if those changes result in a loss of data).
Static data (like that often used in drop-down lists) can be included as part of the publish, in the form of idempotent post-deployment scripts.
Dynamic data would need to be scripted/moved separately.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply