Source: immutable lab5 snapshot f88e9ba43cdfd7eb6a5a7ae5feb4247b4e820071; forward the allowed diff from 64d5c67. Carry SQLAlchemy, Alembic, reliability fixes, versioned jobs, infrastructure and student tests without changing protected coursework files. Validation: make check, validate, lint; 515 student tests passed with one Linux-only skip; public smoke with telemetry enabled and repeat migration passed. Stop the owned stack and retain volumes. Preserve the existing OTel work in progress; grade implementation remains a separate phase.
7 lines
308 B
SQL
7 lines
308 B
SQL
ALTER TABLE attachments
|
|
ADD COLUMN quarantine_reason text
|
|
CHECK (quarantine_reason IN ('missing', 'size_mismatch', 'sha_mismatch')),
|
|
ADD COLUMN quarantined_at timestamptz,
|
|
ADD CONSTRAINT attachments_quarantine_check
|
|
CHECK ((quarantine_reason IS NULL) = (quarantined_at IS NULL));
|