Below snippet of groovy code shows how to add a unique constraint using GRAILS and liquibase.
databaseChangeLog = {
changeSet(author: "myname", id: "1234567890") {
addUniqueConstraint(columnNames: "COL_NAME", constraintName: "SYS_C00123", deferrable: "false", disabled: "false", initiallyDeferred: "false", tableName: "TABLE_NAME")
}
}
No comments:
Post a Comment