We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8036b87 commit f694cfcCopy full SHA for f694cfc
coderd/database/migrations/000293_user_configs.down.sql
@@ -3,11 +3,11 @@ ALTER TABLE users ADD COLUMN IF NOT EXISTS
3
theme_preference text DEFAULT ''::text NOT NULL;
4
5
-- Copy "theme_preference" back to "users"
6
-UPDATE users (theme_preference)
7
- SELECT value
+UPDATE users
+ SET theme_preference = (SELECT value
8
FROM user_configs
9
- WHERE users.id = user_configs.user_id
10
- AND user_configs.key = 'theme_preference';
+ WHERE user_configs.user_id = users.id
+ AND user_configs.key = 'theme_preference');
11
12
-- Drop the "user_configs" table.
13
DROP TABLE user_configs;
0 commit comments