From 0476e5ebb638345817d4d249328986de729a465d Mon Sep 17 00:00:00 2001 From: Nuwan Date: Sat, 16 Mar 2024 22:47:15 +0530 Subject: [PATCH] set default for accept_desktop_notifications --- .../20240121174150_add_accept_desktop_notifications_to_users.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby/db/migrate/20240121174150_add_accept_desktop_notifications_to_users.rb b/ruby/db/migrate/20240121174150_add_accept_desktop_notifications_to_users.rb index c83cd5896..4d0573009 100644 --- a/ruby/db/migrate/20240121174150_add_accept_desktop_notifications_to_users.rb +++ b/ruby/db/migrate/20240121174150_add_accept_desktop_notifications_to_users.rb @@ -1,6 +1,6 @@ class AddAcceptDesktopNotificationsToUsers < ActiveRecord::Migration def self.up - execute("ALTER TABLE public.users ADD COLUMN accept_desktop_notifications BOOLEAN; UPDATE public.users SET accept_desktop_notifications = FALSE;") + execute("ALTER TABLE public.users ADD COLUMN accept_desktop_notifications BOOLEAN; UPDATE public.users SET accept_desktop_notifications = FALSE; ALTER TABLE public.users ALTER COLUMN accept_desktop_notifications SET DEFAULT FALSE;") end def self.down execute("ALTER TABLE public.users DROP COLUMN accept_desktop_notifications;")