grails - Grails数据库迁移-dbm-gorm-diff混淆

标签 grails grails-plugin

我刚刚为已经包含大约100个域的Grails 1.3.7应用程序安装了数据库迁移插件。我运行了最初的dbm-generate-gorm-changelog,它生成了一个看起来不错的changelog.groovy。

我添加了具有3个属性的单个域,然后运行:

dbm-gorm-diff testing.groovy

我期望的是一个可以创建新域的变更日志。我得到的是一个包含1260行changeSet的变更日志。现在,它确实包含了我的新域。但是它还包含我其他大部分(不是全部)域,在两个脚本之间的60秒内没有变化。我是否了解其工作方式不正确?还是我运行了错误的命令?

最佳答案

您需要“运行”第一个迁移,以将其导入Liquibase表,因此,当您运行第二个迁移时,将进行比较。您刚刚生成了两个独立的文件。

请参见http://grails-plugins.github.com/grails-database-migration/docs/manual/guide/2%20Getting%20Started.html中的“典型的初始工作流程”

关于grails - Grails数据库迁移-dbm-gorm-diff混淆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10323248/

相关文章:

grails - 在 Cloud Foundry 中预填充 grails 应用程序 mysql 数据库

grails - 使用Grails Spring Security插件登录的其他字段

mysql - 通信链接失败时Grails重新连接到mysql

grails - 这表示Grails错误: “Cannot read write-only property: emptyStringsToNull”是什么意思?

grails - 域类之间未定义所有者

grails - grails-spring-security-ldap插件配置LDAP连接超时

grails - 使用Cloud Foundry在云上部署时出错

css - Grails 正在为 fullcalendar CSS 和 JS 文件提供未找到的资源

grails - 手动安装插件?

hibernate - 在Gorm条件中:按属性过滤域内的集合