You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. This is a simple database migration commandline application written in php.
7
+
2. It has following dependencies.
8
+
*`symfony/console` for argument parsing ( of cli interface )
9
+
*`psr/log` for managing and priting log messages.
10
+
3. Contents of each SQL file is run as single transaction.
11
+
4. The migrator tool will save the `down` migration (rollback SQL statement) in DB and cross verify it with the current version of the rollback SQL statement present in the disk and complain if both are different.
12
+
13
+
# Usage
14
+
15
+
Migrations are arranged in the following directory structure.
16
+
```
17
+
├── migrations
18
+
│ ├── down
19
+
│ │ ├── 001.sql
20
+
│ │ ├── 002.sql
21
+
│ │ ├── 003.sql
22
+
│ │ └── 004.sql
23
+
│ └── up
24
+
│ ├── 001.sql
25
+
│ ├── 002.sql
26
+
│ ├── 003.sql
27
+
│ └── 004.sql
28
+
└── simple-db-migrator.php
29
+
30
+
```
31
+
32
+
To create a new migration, Just create respective `xxx.sql` file in `up` and `down` directories.
33
+
34
+
## Run initial migration ( ie, create db_migration table )
0 commit comments