Skip to content

Commit d227e42

Browse files
committed
Updated README
1 parent 37689c4 commit d227e42

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $migration->up();
3131

3232
The Migration object controls the database version.
3333

34-
### The Scripts
34+
### The SQL Scripts
3535

3636
The 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 '
6666
The "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+
```

0 commit comments

Comments
 (0)