-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tenant): delegate tenant configuration (#280)
so we can have meetings shared between domains
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
migration/db/migrations/202501211046000_alter_tenant_add_parent.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-- +micrate Up | ||
-- SQL in section 'Up' is executed when this migration is applied | ||
|
||
ALTER TABLE tenants ADD COLUMN parent_id BIGINT DEFAULT NULL; | ||
|
||
ALTER TABLE tenants ADD CONSTRAINT fk_tenants_parent_id | ||
FOREIGN KEY (parent_id) | ||
REFERENCES tenants(id) | ||
ON DELETE CASCADE; | ||
|
||
CREATE INDEX IF NOT EXISTS index_tenants_parent_id_idx ON "tenants" USING HASH (parent_id); | ||
|
||
-- +micrate Down | ||
-- SQL section 'Down' is executed when this migration is rolled back | ||
|
||
ALTER TABLE tenants DROP CONSTRAINT fk_tenants_parent_id; | ||
DROP INDEX IF EXISTS index_tenants_parent_id_idx; | ||
ALTER TABLE tenants DROP COLUMN parent_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters