ALTER TABLE cases ADD COLUMN IF NOT EXISTS "SubmittedAt" TIMESTAMPTZ;

-- Backfill: cases already submitted get CreatedAt as SubmittedAt
UPDATE cases SET "SubmittedAt" = "CreatedAt" WHERE "SubmittedAs" = 'submit' AND "SubmittedAt" IS NULL;
