Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Liquibase in Grails: “Empty result set, expected one row”

I made a change to a Grails domain class and ran

grails db-gorm-diff 2012-11-20-domain-class-change.groovy --add (obviously with another name there)

and was getting a “change lock” error from Liquibase:

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

So (stupidly, it seems) following the advice in an aged thread dealing with a similar problem with the Autobase plugin, I deleted the rows in the change log lock table:

mysql> delete from DATABASECHANGELOGLOCK;

and now get this beautiful Liquibase error:

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

which clearly tells me, too late to change this, that I shouldn’t have deleted that row from the table.

What can I do about this now?

like image 873
Ben Klein Avatar asked Jan 14 '23 23:01

Ben Klein


1 Answers

There is a script for this in the plugin - use http://grails-plugins.github.com/grails-database-migration/docs/manual/ref/Maintenance%20Scripts/dbm-release-locks.html

like image 154
Burt Beckwith Avatar answered Jan 21 '23 03:01

Burt Beckwith