DEV Community

Discussion on: A junior, a mid and a senior dev walk into a bar

Collapse
 
thejoshuaevans profile image
Joshua Evans

Love the article! I don't have much experience with database migrations, so I will have to keep this stuff in mind

One though I had, and this is really just me thinking out loud: with the ease of access to cloud database solutions, would simply creating a brand new database from scratch be effective? Add the changes and migrate the data, then when you are ready all you have to do is change the database endpoint and shut down the old db

Thinking about this as I write, I don't think this would be viable with extremely large datasets - but there are managed solutions from AWS and others to help out with migrations, and some services don't charge for internal data exchanges (for instance, if both the databases are on the same server)

Collapse
 
buinauskas profile image
Evaldas Buinauskas • Edited

Sounds good on paper, but just that.

Creating a new database and moving all the data can take hours, days, even weeks. Also if database is write heavy, data has to be synchronized right before the switch. This creates even more complexity.

I've been dealing with this for past 4 years and sometimes even a new column with a default value can become a headache.

Not to mention that databases usually have more than just data. Replication, subscription to data, CDC solutions, permissions and more. Stuff that's hard to automate or difficult to version.