2012-11-20 23 views
2

我做出了改變,以一個Grails領域類就跑Liquibase Grails中:「查詢結果爲空,預計一排」

grails db-gorm-diff 2012-11-20-domain-class-change.groovy --add(很明顯,另一名有)

,而且正在「改變鎖」錯誤從Liquibase:

Error executing bootstraps: liquibase.exception.LockException: Could not acquire change log lock. Currently locked by computer-name.local […]

所以(愣神,似乎)按照an aged thread dealing with a similar problem with the Autobase plugin的建議,我在更改日誌中的鎖表中刪除行:

mysql> delete from DATABASECHANGELOGLOCK;

,現在得到這個美麗的Liquibase錯誤:

Error executing bootstraps: liquibase.exception.DatabaseException: Empty result set, expected one row

這清楚地告訴我,來不及改變這一點,我不應該刪除從表中的行。

現在我該怎麼辦?

回答

2

我在一般Liquibase相關的地方挖了一些,現在知道我可以簡單地drop the table altogether並在啓動時重新創建它。這似乎奏效了。