chore: create migration to add is_visible_on_guest_dahsboard field on app table
This commit is contained in:
parent
9688e059f3
commit
9b9541cee7
1 changed files with 15 additions and 0 deletions
15
packages/cli/assets/migrations/00009-add-guest-dashboard.sql
Normal file
15
packages/cli/assets/migrations/00009-add-guest-dashboard.sql
Normal 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;
|
Loading…
Add table
Reference in a new issue