I created a unique field using liquibase like this:
Now I would like to name the unique constraint. I naively tried this approach:
But I got following exception:
Caused by: liquibase.exception.ValidationFailedException: Validation Failed:
1 changes have validation failures
liquibase.exception.InvalidChangeDefinitionException: dropUniqueConstraint in 'liquibase/1.0/dbn-8-10-2009.xml::18::dbn' is invalid: constraintName is required
I would really like to know how to add a name to existing constraint or drop a constraint without a name (well with a generated one). Did I “shoot myself in the leg” by not naming the constraints in the first place?
I am running the script against multiple databases and constraint gets called differently so it’s not practical for me to use tag.
Thanks for any tip or hints.