A simple CLI to manage database migrations.
- Sqlite
- PostgreSQL
- MySQL
Stores the current database name.
Stores the current database host.
Stores the current database user.
Stores the current database password.
Stores the current database port.
E.g.:
$ DB_NAME=name DB_PASS=password DB_PORT=5432 migrate init database
Create __migrations
table into the target database.
E.g.:
$ migrate init database
- Need env variables.
Create a new .sql
file into migrations directory.
E.g.:
$ migrate create migration-name
Run all .sql
files from the migrations directory into the target database.
E.g.:
$ migrate run database
- Need env variables.
Show commands description.
E.g.:
$ migrate help