Skip to main content

max / makenotwork

Renumber duplicate migration 067 to 071 067_fingerprint_cascade_delete conflicted with 067_totp_last_used_step which already ran on production. Renumbered to 071. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author: Max J. <87768334+MaxJMath@users.noreply.github.com> · 2026-04-26 02:51 UTC
Commit: 25fefcc300f98f95104178c357a91f563d59de20
Parent: ec897ef
2 files changed, +13 insertions, -13 deletions
@@ -1,13 +0,0 @@
1 - -- Fix download_fingerprints and streaming_sessions FK constraints to cascade on user deletion.
2 - -- Previously these used the default ON DELETE RESTRICT, which blocked account deletion
3 - -- for any user who had downloaded or streamed content.
4 -
5 - ALTER TABLE download_fingerprints
6 - DROP CONSTRAINT download_fingerprints_user_id_fkey,
7 - ADD CONSTRAINT download_fingerprints_user_id_fkey
8 - FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
9 -
10 - ALTER TABLE streaming_sessions
11 - DROP CONSTRAINT streaming_sessions_user_id_fkey,
12 - ADD CONSTRAINT streaming_sessions_user_id_fkey
13 - FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -0,0 +1,13 @@
1 + -- Fix download_fingerprints and streaming_sessions FK constraints to cascade on user deletion.
2 + -- Previously these used the default ON DELETE RESTRICT, which blocked account deletion
3 + -- for any user who had downloaded or streamed content.
4 +
5 + ALTER TABLE download_fingerprints
6 + DROP CONSTRAINT download_fingerprints_user_id_fkey,
7 + ADD CONSTRAINT download_fingerprints_user_id_fkey
8 + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
9 +
10 + ALTER TABLE streaming_sessions
11 + DROP CONSTRAINT streaming_sessions_user_id_fkey,
12 + ADD CONSTRAINT streaming_sessions_user_id_fkey
13 + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;