We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9646f2 commit 3780a60Copy full SHA for 3780a60
migrations/0011_transfer_official_configs_to_real_user.sql
@@ -1,12 +1,12 @@
1
--- Step 1: Update real user's username to 'openboot'
2
-UPDATE users
3
-SET username = 'openboot'
4
-WHERE id = 'google_102596069106824335469';
5
-
6
--- Step 2: Transfer all configs to real user
+-- Step 1: Transfer all configs to real user (while fake user still exists)
7
UPDATE configs
8
SET user_id = 'google_102596069106824335469'
9
WHERE user_id = 'openboot-official';
10
11
--- Step 3: Delete the fake user
+-- Step 2: Delete the fake user (releases username constraint)
12
DELETE FROM users WHERE id = 'openboot-official';
+
+-- Step 3: Update real user's username to 'openboot' (now safe - no conflict)
+UPDATE users
+SET username = 'openboot'
+WHERE id = 'google_102596069106824335469';
0 commit comments