Liquibase

http://www.liquibase.org/documentation/index.html

https://github.com/studygolang/studygolang/tree/master/config/changelogs

数据库变更采用 Liquibase 管理,建表、修改字段、添加索引等操作需要编写 xml 配置文件来实现,不再需要手动改动数据库。

Liquibase 文档: http://www.liquibase.org/documentation/index.html

changelogs 文件夹下建议按照 1.0、1.1、1.2、2.0 ... 等存放每次需要改动的配置文件。

每个版本中的 xml 文件名需要和 env.ini 中配置 dbname 的一致,比如 studygolang.xml.

原文地址:https://www.cnblogs.com/rsapaper/p/9424423.html