PHP Classes


Recommend this page to a friend!
  Classes of Istvan Dobrentei   PHP DB Migration Library   Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP DB Migration Library
Migrate MySQL database tables with given SQL files
Author: By
Last change:
Date: 5 years ago
Size: 1,037 bytes


Class file image Download


Migration Class to help automatization

The migration Class is a command line php utility and it helps to automatizate database changings and its migrations. It is useful for example to create a Continous Integration environment. The sqlauto directory containts an init script and some mysql stored procedures.


put mysql migration files into the sqlauto directory file name conventions:

- start with sql + iso date format (YYYYMMDD)  
- should end with .sql  


/usr/local/bin/php migration_runner.php --host= --database=bl_model_unit --user=root --password=345+4 --forceload=1 --droptables=1

input parameters:


   the mysql database host  


   the mysql database name  


   the mysql database user  


   the mysql database password  


   it will load all sql files into the database, ignore the .migrated file content  


   it will drop all tables inside the database