0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/schemas/tables/resource_scopes.sql
simeng-li 492724a575
refactor(core): resources related db query cleanup (#179)
* refactor(core): resources related db query cleanup

clean resourece & scopes db queries

* refactor(core): rename resources and scopes query file name

rename plural filename
2022-01-14 11:54:09 +08:00

17 lines
No EOL
409 B
SQL

create table resource_scopes (
id varchar(24) not null,
name varchar(64) not null,
description text not null,
resource_id varchar(24) not null,
primary key (id),
constraint fk_resource
foreign key (resource_id)
references resources(id)
on delete cascade
);
create unique index resource_scopes__resource_id_name
on resource_scopes (
resource_id,
name
);