创建migrations

migrate create -ext sql -dir db/migration -seq init_schema
# -ext 文件扩展名为sql
# -seq 标志生成的迁移文件的顺序版本号(init_schema任意写,比如:create_accounts)
db/migration
000001_init_schema.up.sql
000001_init_schema.down.sql
*.sql000001_init_schema.up.sql
CREATE TABLE accounts (
	name varchar(16)
);
CREATE TABLE transfers (
	name varchar(16)
);
000001_init_schema.down.sql000001_init_schema.up.sql
DROP TABLE IF EXISTS accounts;
DROP TABLE IF EXISTS transfers;