diff --git a/internal/database/schema.sql b/internal/database/schema.sql index 64b03a0..bc03da2 100644 --- a/internal/database/schema.sql +++ b/internal/database/schema.sql @@ -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