migrate 软件
https://github.com/rubenv/sql-migrate
下载安装
go get -v github.com/rubenv/sql-migrate/...
教程:https://github.com/rubenv/sql-migrate
使用
sql-migrate 命令
\$ sql-migrate --help
usage: sql-migrate [--version] [--help] <command> [<args>]
Available commands are:
down Undo a database migration
new Create a new migration
redo Reapply the last migration
status Show migration status
up Migrates the database to the most recent version available
sql-migrate up --help
\$ sql-migrate up --help
Usage: sql-migrate up [options] ...
Migrates the database to the most recent version available.
Options:
-config=dbconfig.yml Configuration file to