-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0b0d71
commit 0ffb3d6
Showing
25 changed files
with
541 additions
and
24 deletions.
There are no files selected for viewing
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
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
7 changes: 7 additions & 0 deletions
7
hasura.planx.uk/migrations/1692609979701_create_table_public_user_role_enum/down.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,7 @@ | ||
alter table | ||
"public"."team_members" drop constraint "team_members_role_fkey"; | ||
|
||
alter table | ||
"public"."team_members" drop column "role"; | ||
|
||
DROP TABLE "public"."user_roles"; |
23 changes: 23 additions & 0 deletions
23
hasura.planx.uk/migrations/1692609979701_create_table_public_user_role_enum/up.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,23 @@ | ||
CREATE TABLE "public"."user_roles" ( | ||
"value" text NOT NULL, | ||
PRIMARY KEY ("value"), | ||
UNIQUE ("value") | ||
); | ||
|
||
COMMENT ON TABLE "public"."user_roles" IS E'Enum of possible user roles in PlanX'; | ||
|
||
INSERT INTO | ||
"public"."user_roles"("value") | ||
VALUES | ||
(E'teamAdmin'), | ||
(E'teamViewer'); | ||
|
||
alter table | ||
"public"."team_members" | ||
add | ||
column "role" text not null default 'teamViewer'; | ||
|
||
alter table | ||
"public"."team_members" | ||
add | ||
constraint "team_members_role_fkey" foreign key ("role") references "public"."user_roles" ("value") on update cascade on delete cascade; |
3 changes: 3 additions & 0 deletions
3
...k/migrations/1692863825415_alter_table_public_users_add_column_isPlatformManager/down.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,3 @@ | ||
comment on column "public"."users"."is_platform_admin" is NULL; | ||
|
||
ALTER TABLE "public"."users" DROP COLUMN "is_platform_admin"; |
4 changes: 4 additions & 0 deletions
4
....uk/migrations/1692863825415_alter_table_public_users_add_column_isPlatformManager/up.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,4 @@ | ||
alter table "public"."users" add column "is_platform_admin" boolean | ||
not null default 'false'; | ||
|
||
comment on column "public"."users"."is_platform_admin" is E'A Platform Admin is the highest level of permission in PlanX, and can operate across all teams'; |
1 change: 1 addition & 0 deletions
1
...rations/1692911007802_alter_table_public_team_members_add_unique_user_id_team_id/down.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 @@ | ||
alter table "public"."team_members" drop constraint "team_members_user_id_team_id_key"; |
1 change: 1 addition & 0 deletions
1
...igrations/1692911007802_alter_table_public_team_members_add_unique_user_id_team_id/up.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 @@ | ||
alter table "public"."team_members" add constraint "team_members_user_id_team_id_key" unique ("user_id", "team_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
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
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
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
Oops, something went wrong.