Skip to content

A Simple bash shell script to keep a series of migration logs for all changes made to a MySQL database schema

Notifications You must be signed in to change notification settings

stevecomrie/mysql-version-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

mysql-version-control

A Simple bash shell script to keep a series of migration logs for all changes made to a MySQL database schema

This script requires the Perl based mysqldiff tool in order to work properly.

mysqldiff

http://search.cpan.org/dist/MySQL-Diff/bin/mysqldiff

Usage

Place the script in a directory off your project root (e.g. mysql_version) and configure the database access variables at the top of the script.

Have your build tool (or manually) call the script before each commit.

The script will create two sub-directories.

./logs which will hold a history of all mysql schema dumps

./migrations which will hold a numbered series of schema updates required to move the database through each set of changes.

Running the script when no changes have been made to the database schema will result in no log or migration files being generated.

About

A Simple bash shell script to keep a series of migration logs for all changes made to a MySQL database schema

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages