File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ $migration->up();
3131
3232The Migration object controls the database version.
3333
34- ### The Scripts
34+ ### The SQL Scripts
3535
3636The scripts are divided in three set of scripts:
3737
@@ -66,4 +66,33 @@ For example: 00001.sql is the script for move the database from version '2' to '
6666The "down" folder is optional.
6767
6868
69+ ## Running in the command line
6970
71+ Migration library creates the 'migrate' script. It has the follow syntax:
72+
73+ ```
74+ Usage:
75+ command [options] [arguments]
76+
77+ Available commands:
78+ down Migrate down the database version.
79+ reset Create a fresh new database
80+ up Migrate Up the database version
81+
82+ Arguments:
83+ connection The connection string. Ex. mysql://root:password@server/database [default: false]
84+
85+ Example:
86+ migrate reset mysql://root:password@server/database
87+ migrate up mysql://root:password@server/database
88+ migrate down mysql://root:password@server/database
89+ migrate up --up-to=10 --path=/somepath mysql://root:password@server/database
90+ migrate down --up-to=3 --path=/somepath mysql://root:password@server/database
91+ ```
92+
93+ ## Installing Globally
94+
95+ ``` bash
96+ composer global require ' byjg/migration=1.0.*'
97+ sudo ln -s $HOME /.composer/vendor/bin/migrate /usr/local/bin
98+ ```
You can’t perform that action at this time.
0 commit comments