set default for accept_desktop_notifications

This commit is contained in:
Nuwan 2024-03-16 22:47:15 +05:30
parent e5dc8b57ec
commit 0476e5ebb6
1 changed files with 1 additions and 1 deletions

View File

@ -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;")