You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
addUniqueConstraint(columnNames: 'A,B') // Ugh, hard-coded column names with commas to boot
addUniqueConstraint(columnNames: ['A', 'B'].join(',')) // Data driven is better, but must convert to String with commas
When it would be more natural to do this:
addUniqueConstraint(columnNames: ['A', 'B']) // Data driven, no need to mess with commas! But, doesn't work, seems to pass the toString() result '[A, B]' to Liquibase, which interprets as '[A' and 'B]'.
Only using columnNames and addUniqueConstraint as examples, there are numerous such places in the Liquibase DSL.
The text was updated successfully, but these errors were encountered:
I like the idea, it does feel more natural. Liquibase itself expects a single string to describe the list of columns, but I'm thinking the groovy parser could find arrays and do the join for us.
I hesitate to implement this yet because Liquibase 4 development is underway, and it is probably going to radically change how the groovy parser works, but in good ways. The parser would become much more version agnostic and it would handle things added by Liquibase extensions. At the moment, I'd like to avoid adding a feature that I couldn't carry forward into Liquibase 4.
I'll keep an eye on this as Liquibase 4 becomes more concrete.
It's not very DSL friendly, to have to do this:
When it would be more natural to do this:
Only using
columnNames
andaddUniqueConstraint
as examples, there are numerous such places in the Liquibase DSL.The text was updated successfully, but these errors were encountered: