11# Database Migrations
22[ ![ Scrutinizer Code Quality] ( https://scrutinizer-ci.com/g/byjg/migration/badges/quality-score.png?b=master )] ( https://scrutinizer-ci.com/g/byjg/migration/?branch=master )
33[ ![ SensioLabsInsight] ( https://insight.sensiolabs.com/projects/571cb412-7018-4938-a4e5-0f9ce44956d7/mini.png )] ( https://insight.sensiolabs.com/projects/571cb412-7018-4938-a4e5-0f9ce44956d7 )
4+ [ ![ Build Status] ( https://travis-ci.org/byjg/migration.svg?branch=master )] ( https://travis-ci.org/byjg/migration )
45
56A micro framework in PHP for managing a set of database migrations using pure Sql.
67
@@ -18,8 +19,8 @@ The basic usage is
1819See an example:
1920
2021``` php
21- $connection = new ConnectionManagement ('mysql://migrateuser:migratepwd@localhost/migratedatabase');
22- $migration = new Migration($connection , '.');
22+ $connectionUri = new \ByJG\Util\Uri ('mysql://migrateuser:migratepwd@localhost/migratedatabase');
23+ $migration = new Migration($connectionUri , '.');
2324
2425// Restore the database using the "base.sql" script and run ALL existing scripts for up the database version
2526// and run the up() method to maintain the database updated;
@@ -90,9 +91,29 @@ Example:
9091 migrate down --up-to=3 --path=/somepath mysql://root:password@server/database
9192```
9293
94+ ## Suportted databases:
95+
96+ * Sqlite
97+ * Mysql / MariaDB
98+ * Postgres
99+ * SqlServer
100+
93101## Installing Globally
94102
95103``` bash
96- composer global require ' byjg/migration=1.0 .*'
104+ composer global require ' byjg/migration=1.1 .*'
97105sudo ln -s $HOME /.composer/vendor/bin/migrate /usr/local/bin
98106```
107+
108+ ## Unit Tests
109+
110+ This library has integrated tests and need to be setup for each database you want to test.
111+
112+ Basiclly you have the follow tests:
113+
114+ ```
115+ phpunit tests/SqliteCommandTest.php
116+ phpunit tests/MysqlCommandTest.php
117+ phpunit tests/PostgresCommandTest.php
118+ phpunit tests/SqlServerCommandTest.php
119+ ```
0 commit comments