-- +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;