diff --git a/ordinis-migrations/src/main/resources/db/changelog/changes/0032-record-drafts-reopen-operation.xml b/ordinis-migrations/src/main/resources/db/changelog/changes/0032-record-drafts-reopen-operation.xml new file mode 100644 index 0000000..b9e3349 --- /dev/null +++ b/ordinis-migrations/src/main/resources/db/changelog/changes/0032-record-drafts-reopen-operation.xml @@ -0,0 +1,42 @@ + + + + + + + Extend record_drafts_operation_check: add REOPEN + + ALTER TABLE record_drafts + DROP CONSTRAINT IF EXISTS record_drafts_operation_check; + ALTER TABLE record_drafts + ADD CONSTRAINT record_drafts_operation_check + CHECK (operation IN ('CREATE', 'UPDATE', 'CLOSE', 'REOPEN')); + + + ALTER TABLE record_drafts + DROP CONSTRAINT IF EXISTS record_drafts_operation_check; + ALTER TABLE record_drafts + ADD CONSTRAINT record_drafts_operation_check + CHECK (operation IN ('CREATE', 'UPDATE', 'CLOSE')); + + + diff --git a/ordinis-migrations/src/main/resources/db/changelog/master.xml b/ordinis-migrations/src/main/resources/db/changelog/master.xml index e5be568..43bc6c1 100644 --- a/ordinis-migrations/src/main/resources/db/changelog/master.xml +++ b/ordinis-migrations/src/main/resources/db/changelog/master.xml @@ -41,5 +41,6 @@ +