Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Managing database updates

Tags:

sql

build

I've been thinking of ways to improve managing changes to our database structure. I have a build server that creates nightly builds, so I was thinking we could somehow create database dumps, backups, and scripts from the test environment as part of the build process. Then when deploying an update to the client we could use a tool like DBDiff to create the database update script.

Is anybody doing something similar? Is it even a good idea? Maybe some good tips what to use to create these dumps on build server?

like image 865
hs2d Avatar asked Jul 29 '11 11:07

hs2d


1 Answers

Rather than identifying the differences, I recommend to keep a proper script that creates a database from scratch.

We are quite satisfied with using Liquibase to manage all DB migration in our projects. It knows which "patches" have been applied and ensures that only those that are missing will be applied to the target database.

like image 110
a_horse_with_no_name Avatar answered Sep 20 '22 06:09

a_horse_with_no_name