go-pg-migrations:一个Go包,可帮助使用go-pgpg编写迁移

时间:2021-02-05 22:45:13
【文件属性】:
文件名称:go-pg-migrations:一个Go包,可帮助使用go-pgpg编写迁移
文件大小:30KB
文件格式:ZIP
更新时间:2021-02-05 22:45:13
go golang migrations postgresql go-pg 去pg-migrations 一个Go软件包,可帮助使用编写迁移。 用法 安装 因为go-pg,所以go-pg-migrations也具有模块支持。 目前取决于v go-pg 。 要安装它,请在带有go.mod的项目中使用以下命令: $ go get github.com/robinjoseph08/go-pg-migrations/v3 如果尚未使用Go模块,则仍可以使用此软件包的v1。 跑步 要查看如何使用此软件包,可以查看。 您需要做的就是拥有一个main包(例如example )。 调用migrations.Run 。运行您要保存迁移文件的目录(该目录将与主软件包的目录相同,例如
【文件预览】:
go-pg-migrations-master
----tools.go(128B)
----migrations.go(2KB)
----rollback_test.go(3KB)
----.golangci.yml(452B)
----go.mod(866B)
----create.go(820B)
----create_test.go(592B)
----go.sum(23KB)
----rollback.go(2KB)
----migrate.go(3KB)
----scripts()
--------coverage.sh(471B)
----help.go(564B)
----migrations_test.go(702B)
----.chglog()
--------config.yml(500B)
--------CHANGELOG.tpl.md(649B)
----.travis.yml(235B)
----example()
--------main.go(384B)
--------20180812001528_create_users_table.go(632B)
----LICENSE(1KB)
----setup.go(1KB)
----README.md(7KB)
----Makefile(2KB)
----migrate_test.go(5KB)
----.gitignore(990B)
----.go-version(7B)
----setup_test.go(2KB)
----CHANGELOG.md(3KB)

网友评论