Skip to content

reduardo7/db-version-updater-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

db-version-updater-mysql | DB Version Updater (MySQL)

Description

Keep the verion of the database model updated, using a MySQL script.

With this script, you can keep the version of the database model without needing another tool than MySQL console.

It is the simplest and easiest way to perform this task so common, without the need to using other extra tools.

To work, creates an auxiliar database table (database_version) to register the executed scripts, and prevent to execute any executed script.

Why use it?

  1. Very easy to implement.
  2. No additionals components required.
  3. No need to learn a new language.
  4. No need to learn a new syntax.

Configuration

Simply change the database name to use, or remove it for manually select.

USE databaseName

Use

From MySQL console

source /path/to/db_updater.sql;

If "USE database" is removed, then:

USE databaseName;
source /path/to/db_updater.sql;

From terminal or command line

mysql -u USER -p < /path/to/db_updater.sql

or

mysql -u USER -pPASS databaseName < /path/to/db_updater.sql

About

Keep the verion of the database model updated, using a MySQL script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published