How do I get the primaryKeyExists preCondition to work?

I am attempting to write a preCondition can’t see it for some reason.

Curious if anyone else has experienced it.

Best,
Laird


http://about.me/lairdnelson

I haven’t seen an issue with the primaryKeyExists check on sqlserver, but I haven’t directly checked it myself for a while. You could always fall back to the precondition as well.


In 2.0 and before the index metadata wasn’t always read as nicely as one would like, so it may be a bug as well.


Nathan

Found the issue; I’ll let you decide whether it’s a bug or not.

In DATABASECHANGELOG is among the tables, it concludes that it is not.  Obviously if the table doesn’t exist, then neither does its primary key.

For now I’ll just do a SQL check and restrict the changeset to run on SQL Server only.

Best,
Laird


http://about.me/lairdnelson

Oh, I should mention as well that of course the primaryKeyExists to also check the Liquibase tables’ primary keys.

Best,
Laird


http://about.me/lairdnelson