chore: create migration to add is_visible_on_guest_dahsboard field on app table

This commit is contained in:
Nicolas Meienberger 2023-11-02 07:54:32 +01:00 committed by Nicolas Meienberger
parent 9688e059f3
commit 9b9541cee7

View file

@ -0,0 +1,15 @@
-- Update app table to add "is_visible_on_guest_dashboard" column
ALTER TABLE "app"
ADD COLUMN IF NOT EXISTS "is_visible_on_guest_dashboard" boolean DEFAULT FALSE;
-- Set default value to false
UPDATE
"app"
SET
"is_visible_on_guest_dashboard" = FALSE
WHERE
"is_visible_on_guest_dashboard" IS NULL;
-- Set is_visible_on_guest_dashboard column to not null constraint
ALTER TABLE "app"
ALTER COLUMN "is_visible_on_guest_dashboard" SET NOT NULL;