13 lines
421 B
MySQL
13 lines
421 B
MySQL
|
|
-- Allow dynamic case statuses managed by settings instead of hard-coded DB enum-like check
|
||
|
|
-- Replaces legacy constraint that only allowed 'åben' and 'lukket'.
|
||
|
|
|
||
|
|
ALTER TABLE sag_sager
|
||
|
|
DROP CONSTRAINT IF EXISTS sag_sager_status_check;
|
||
|
|
|
||
|
|
ALTER TABLE sag_sager
|
||
|
|
DROP CONSTRAINT IF EXISTS sag_sager_status_nonempty_check;
|
||
|
|
|
||
|
|
ALTER TABLE sag_sager
|
||
|
|
ADD CONSTRAINT sag_sager_status_nonempty_check
|
||
|
|
CHECK (length(trim(status)) > 0);
|