fix: add ON DELETE CASCADE to uploads FK on snapshot_id #44

Merged
sneak merged 1 commits from fix/uploads-fk-cascade into main 2026-03-19 13:59:27 +01:00
Showing only changes of commit bc70a0a973 - Show all commits

View File

@@ -130,7 +130,7 @@ CREATE TABLE IF NOT EXISTS uploads (
size INTEGER NOT NULL,
duration_ms INTEGER NOT NULL,
FOREIGN KEY (blob_hash) REFERENCES blobs(blob_hash),
FOREIGN KEY (snapshot_id) REFERENCES snapshots(id)
FOREIGN KEY (snapshot_id) REFERENCES snapshots(id) ON DELETE CASCADE
);
-- Index for efficient snapshot lookups