0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/schemas/tables/organization_roles.sql

20 lines
663 B
MySQL
Raw Normal View History

/* init_order = 1 */
/** The roles defined by the organization template. */
create table organization_roles (
tenant_id varchar(21) not null
references tenants (id) on update cascade on delete cascade,
/** The globally unique identifier of the organization role. */
id varchar(21) not null,
/** The organization role's name, unique within the organization template. */
name varchar(128) not null,
/** A brief description of the organization role. */
description varchar(256),
primary key (id),
constraint organization_roles__name
unique (tenant_id, name)
);
create index organization_roles__id
on organization_roles (tenant_id, id);