英文:
What package to use for database migrations in Go?
问题
我对golang还比较新,正在尝试找到最适合的工具。目前我正在评估以下几个包:
https://github.com/mattes/migrate
https://github.com/DavidHuie/gomigrate
https://bitbucket.org/liamstask/goose/
我想知道是否有人对这些包(或其他包)有过使用经验,并能提供一些评论。
英文:
I am fairly new to golang, and trying to identify the best tools for the job. Currently I am evaluating the following packages:
https://github.com/mattes/migrate
https://github.com/DavidHuie/gomigrate
https://bitbucket.org/liamstask/goose/
I was wondering if anyone had any experience with these (or other packages) and could provide some comments.
答案1
得分: 2
我们在工作中使用mattes/migrate
,非常满意。它可以使用普通的SQL文件,自动处理文件命名,并且可以通过CLI轻松地进行自动化操作。它不涉及任何Go特定的内容。
而使用gomigrate
,你需要自己创建文件,并编写代码来执行迁移操作。
英文:
We use mattes/migrate
at work and are very happy with it. It works with plain SQL files, handles file naming by itself and can easily be automated via CLI. It doesn't do anything Go specific.
With gomigrate
you need to create the files yourself and write code for executing the migrations.
答案2
得分: 2
请看 https://github.com/pressly/goose,这是 https://bitbucket.org/liamstask/goose/ 的一个维护分支。
英文:
Take a look at https://github.com/pressly/goose, a maintained fork of https://bitbucket.org/liamstask/goose/.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论