Skip to content

Commit

Permalink
Merge pull request #1202 from NASA-AMMOS/refactor/simplify-extension-…
Browse files Browse the repository at this point in the history
…roles

Simplify extension_roles
  • Loading branch information
Mythicaeda authored Oct 16, 2023
2 parents 7264991 + 5864853 commit 82e0e8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ insert_permissions:
update_permissions:
- role: aerie_admin
permission:
columns: [extension_id, role]
columns: [role]
filter: {}
delete_permissions:
- role: aerie_admin
Expand Down
13 changes: 4 additions & 9 deletions deployment/hasura/migrations/AerieUI/2_extensions/up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,11 @@ create trigger extensions_set_timestamp
execute function extensions_set_updated_at();

create table extension_roles (
id integer generated always as identity,
extension_id integer not null,
extension_id integer not null references extensions(id)
on update cascade
on delete cascade,
role text not null,

constraint extension_roles_primary_key primary key (id),
constraint extension_roles_to_extension
foreign key (extension_id)
references "extensions"
on update cascade
on delete cascade
primary key(extension_id, role)
);

comment on table extension_roles is e''
Expand Down
13 changes: 4 additions & 9 deletions deployment/postgres-init-db/sql/ui/tables/extension_roles.sql
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
create table extension_roles (
id integer generated always as identity,
extension_id integer not null,
extension_id integer not null references extensions(id)
on update cascade
on delete cascade,
role text not null,

constraint extension_roles_primary_key primary key (id),
constraint extension_roles_to_extension
foreign key (extension_id)
references "extensions"
on update cascade
on delete cascade
primary key (extension_id, role)
);

comment on table extension_roles is e''
Expand Down

0 comments on commit 82e0e8f

Please sign in to comment.