Supported databases:
- PostgreSQL;
Docker:
docker run --rm -v/path/to/migrations:/migrations borodyadka/db-migrate up -d postgres://user:pass@host:5432/database
CLI:
migrate up -d postgres://user:pass@host:5432/database -s /path/to/migrations
Commands:
up [n]
— apply migrations, defaultn
isMaxInt32
down [n]
— revert migrations, defaultn
is1
create <name>
— create new migrationtest
— tests connection
DATABSE_URL
or--db-url
/-d
in formatpostgres://user:pass@host:5432/database?sslmode=disable
HISTORY_TABLE
or--history-table
/-t
, default ismigrations_history
LOG_LEVEL
or--verbosity
/-v
one ofdebug
,info
,warning
,error
SOURCE_DIR
or--source
/-s
path to migrations dir, default is pwd
- tests