Suggestion: Make attribute constraintName required in addUniqueConstraint


I would prefer it if the constraintName attribute was mandatory for all the changes which add constraints (such as addUniqueConstraint).

I deploy the same application to 2 different databases. One is my development environment, the other one is the user test environment, a third will be the production environment in the future.

When I began using liquibase in my current project, I didn’t give names to unique constraints. This causes problems now when I want to refactor these tables. When no name is given, liquibase generates a random name, something like this: UQ_123456789_12345. This makes it impossible to delete or update these constraints later on, because the random names differ on all deployment environments!

Therefore I would suggest to make the constraintName attribute mandatory. (Or use a common seed when generating the names. But actually I would prefer it if the name was mandatory.)

I think this is a good idea. One clarification though - it probably isn’t liquibase that is generating the names, it is the database engine itself. 

Steve Donie
Principal Software Engineer
Datical, Inc.

I see. That explains the different names, of course. Thank you for clarifying!