Home 从ruby到go
Post
Cancel

从ruby到go

golang-migrate 跟rails 几乎一样。

安装

go get -u -d github.com/golang-migrate/migrate/cmd/migrate

go get -u -d github.com/golang-migrate/migrate

上面2个二选一

cd ~/go/pkg/mod/github.com/golang-migrate/

cd ~/go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/cmd/migrate

然后 $ go install . 

就可以看到这个命令了。

使用:

https://github.com/golang-migrate/migrate/blob/master/GETTING_STARTED.md

This post is licensed under CC BY 4.0 by the author.
Contents