Files
mtusi2026lab7/backend/db/migrations/00006_slo_facts.sql
T
rey eb1b5c7b84
Skeleton contracts / contracts (pull_request) Canceled after 0s
Prepare verified laboratory 7 implementation and evidence
2026-11-17 17:32:06 +03:00

9 lines
482 B
SQL

-- +goose Up
-- Historical upload/create time is not evidence of acceptance/readiness; leave
-- pre-migration rows unknown instead of inventing SLO history.
ALTER TABLE attachments ADD COLUMN accepted_at timestamptz, ADD COLUMN first_ready_at timestamptz;
CREATE INDEX attachments_slo_accepted ON attachments(accepted_at) WHERE accepted_at IS NOT NULL;
-- +goose Down
DROP INDEX attachments_slo_accepted;
ALTER TABLE attachments DROP COLUMN accepted_at, DROP COLUMN first_ready_at;