uploads table FK on snapshot_id lacks ON DELETE CASCADE #18
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/vaultik#18
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In
schema.sql, theuploadstable has:Unlike
snapshot_filesandsnapshot_blobswhich haveON DELETE CASCADE, theuploadsFK does not cascade. This means deleting a snapshot without first deleting its uploads will fail with a FK violation (if FK enforcement is on). The code works around this by manually deleting uploads first indeleteSnapshotFromLocalDB, butsyncWithRemotedoes NOT do this cleanup.Ref: parent issue #1