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/scopes.sql
simeng-li 9518658595
fix(schemas): fix the get interation/consent api bug (#5503)
* fix(schemas): fix the get interation/consent api bug

fix the get interation/consent api bug

* chore: update changeset

update changeset

* fix: update changeset

update changeset

* refactor(schemas, console): alter the resource scopes description field to nullable (#5504)

* refactor(schemas, console): alter the resoruce scopes description field nullable

make the resourec scopes description nullable

* fix(test): fix the type issue in the integration test

fix the type issue in the integration test

* fix(console): add the field register

add the field register

* fix: update the changeset

update the changeset

* fix(console,test): update comments and rebase

update comments and rebase the master
2024-03-20 14:31:35 +08:00

18 lines
528 B
SQL

/* init_order = 2 */
create table scopes (
tenant_id varchar(21) not null
references tenants (id) on update cascade on delete cascade,
id varchar(21) not null,
resource_id varchar(21) not null
references resources (id) on update cascade on delete cascade,
name varchar(256) not null,
description text,
created_at timestamptz not null default(now()),
primary key (id),
constraint scopes__resource_id_name
unique (tenant_id, resource_id, name)
);
create index scopes__id
on scopes (tenant_id, id);