Add the quarantine columns for the storage reconciler

Migration 0004 adds a nullable quarantine reason (missing, size or
digest mismatch) and the time it was set, both null or both present.
Nullable columns without a default only touch the catalogue, so the
running version keeps working while the migration is applied.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
This commit is contained in:
Artyom
2026-10-29 03:11:59 +03:00
co-authored by Claude Opus 5.5
parent 148868bdfb
commit 62986245a2
3 changed files with 14 additions and 3 deletions
+6 -1
View File
@@ -25,7 +25,12 @@ async def counts() -> list[int]:
async def test_migrations_are_ordered_and_versioned() -> None:
versions = [version for version, _ in migrations()]
assert versions == sorted(versions)
assert versions[:3] == ["0001_init", "0002_idempotency_keys", "0003_attachments"]
assert versions == [
"0001_init",
"0002_idempotency_keys",
"0003_attachments",
"0004_attachment_quarantine",
]
applied = await scalar("SELECT array_agg(version ORDER BY version) FROM schema_migrations")
assert applied == versions