Skip to content

Commit

Permalink
Simplify extension_roles table
Browse files Browse the repository at this point in the history
  • Loading branch information
Mythicaeda committed Oct 16, 2023
1 parent 7264991 commit a0f3a29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
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 a0f3a29

Please sign in to comment.