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>
2 files changed,
+13 insertions,
-13 deletions
| 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;
|
|
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;
|