Skip to content

Commit

Permalink
fix(authority): Add migration script to set defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
naqvis committed Aug 6, 2024
1 parent 3baede7 commit c9e4617
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

ALTER TABLE authority
ALTER COLUMN email_domains SET DEFAULT '{}';
UPDATE authority SET email_domains = '{}' WHERE email_domains IS NULL;

-- +micrate Down
-- SQL section 'Down' is executed when this migration is rolled back
2 changes: 1 addition & 1 deletion src/placeos-models/authority.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module PlaceOS::Model
"default_app" => JSON::Any.new("/backoffice/"),
}

attribute email_domains : Array(String)? = [] of String
attribute email_domains : Array(String) = [] of String

macro finished
# Ensure only the host is saved.
Expand Down

0 comments on commit c9e4617

Please sign in to comment.