0

My last two changesets in changelog.xml are not getting executed on application startup. There are no errors in the log file, but when I look at the databasechangelog, I do not see the statements. Nor do I see the tables. (These are simple create table changesets.)

Any tips on how to troubleshoot or debug would be much appreciated. Below are my changeset. I've simplified them once I realized migration wasn't happening. But what I really want to figure out is how to turn on logging, as I am mystified about what happened. (This was working fine 2 days ago.)

<changeSet author='rtrei' id='test1'>

<createTable tableName="foo">
<column autoIncrement="true" name="id" type="bigint">
<constraints nullable="false" primaryKey="true" primaryKeyName="fooPK"/>
</column>
<column name="version" type="bigint">
<constraints nullable="false"/>
</column>
</createTable>
 <createTable tableName="foo2">
<column autoIncrement="true" name="id" type="bigint">
<constraints nullable="false" primaryKey="true" primaryKeyName="foo2PK"/>
</column>
<column name="version" type="bigint">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>    
Robin Trei
  • 91
  • 11
  • 1
    Make sure you actually include them (i have not seen xml for grails in a while, the default is .groovy files and there usually is a central file and that includes the other steps). Also ramp up the logging (for grails3 at least the package is `liquibase`) to `DEBUG` or maybe even `TRACE` – cfrick Dec 20 '18 at 11:54
  • 1
    Check that locked isn't set to 1 from a previous run of liquibase, http://www.liquibase.org/documentation/databasechangeloglock_table.html, if it isn't, mabye, on a test system drop all your tables and delete contents of DATABASECHANGELOG which should force creation of everything again when you boot app, including your new changes or maybe not. – Mike W Dec 21 '18 at 07:14
  • To add to @MikeW answer - you can try releasing locks with `grails dbm-release-locks`. – pawels Dec 27 '18 at 15:33

0 Answers0