Audit of cde5089
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
ALTER TABLE users ADD COLUMN notify_questions INTEGER NOT NULL DEFAULT 1;
|
||||
ALTER TABLE users ADD COLUMN notify_reports INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE users ADD COLUMN notify_errors INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE users ADD COLUMN notify_rate_limits INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE users ADD COLUMN notify_ready INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE users ADD COLUMN notify_discard INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE users ADD COLUMN notify_merge_problems INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE users ADD COLUMN notify_workflows INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
UPDATE users SET
|
||||
notify_questions = coalesce(json_extract(notification_prefs, '$.questions'), 0),
|
||||
notify_reports = coalesce(json_extract(notification_prefs, '$.reports'), 0),
|
||||
notify_errors = coalesce(json_extract(notification_prefs, '$.errors'), 0),
|
||||
notify_rate_limits = coalesce(json_extract(notification_prefs, '$.rate_limits'), 0),
|
||||
notify_ready = coalesce(json_extract(notification_prefs, '$.ready'), 0),
|
||||
notify_discard = coalesce(json_extract(notification_prefs, '$.discard'), 0),
|
||||
notify_merge_problems = coalesce(json_extract(notification_prefs, '$.merge_problems'), 0),
|
||||
notify_workflows = coalesce(json_extract(notification_prefs, '$.workflows'), 0);
|
||||
|
||||
ALTER TABLE users DROP COLUMN notification_prefs;
|
||||
Reference in New Issue
Block a user