There seems to be a change to the way the precondition’s functionality. During an attempted upgrade I was unable to figure out a workaround for an old use case of this check which was intended not only to ensure that there was no element with an ID of -1 but more so checking that there was nothing in the table.
Is there any new command for verifying if a table has any data at all? If not I don’t see how to reliably test whether or not to load data into an empty table where the table could already have the data or be newly created, in the case of a new database being generated.
select category_description from element_category where category_id = -1
When i use the liquibase scripts to generate a fresh database for testing I get the following error:
Error setting up or running Liquibase: Migration failed for change set src/test/resources/liquibase/changelogs/2010-10-25-release/db.changelog-2010-04-07-imprint_category_integrity.xml::IMPRINT_CATEGORY_INTEGRITY_FIX_FOREIGN_KEY_DATA::Martin Dale Lyness:
src/test/resources/liquibase/db.changelog-master.xml : Empty result set, expected one row
Caused By: Precondition Error