init push
This commit is contained in:
8
migrations/20260624_complaint_mel_severity_not_null.sql
Normal file
8
migrations/20260624_complaint_mel_severity_not_null.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- +goose Up
|
||||
-- Classification is now mandatory at creation, so pending (NULL) no longer occurs.
|
||||
-- Backfill any legacy unclassified complaints to NON-MEL (0) before making the column NOT NULL.
|
||||
UPDATE complaints SET mel_severity = 0 WHERE mel_severity IS NULL;
|
||||
ALTER TABLE complaints MODIFY COLUMN mel_severity TINYINT NOT NULL DEFAULT 0;
|
||||
|
||||
-- +goose Down
|
||||
ALTER TABLE complaints MODIFY COLUMN mel_severity TINYINT NULL;
|
||||
Reference in New Issue
Block a user