set default for accept_desktop_notifications
This commit is contained in:
parent
e5dc8b57ec
commit
0476e5ebb6
|
|
@ -1,6 +1,6 @@
|
||||||
class AddAcceptDesktopNotificationsToUsers < ActiveRecord::Migration
|
class AddAcceptDesktopNotificationsToUsers < ActiveRecord::Migration
|
||||||
def self.up
|
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
|
end
|
||||||
def self.down
|
def self.down
|
||||||
execute("ALTER TABLE public.users DROP COLUMN accept_desktop_notifications;")
|
execute("ALTER TABLE public.users DROP COLUMN accept_desktop_notifications;")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue