trifid/trifid-api/migrations/20230203025138_create_roles...

10 lines
309 B
MySQL
Raw Normal View History

CREATE TABLE roles (
id SERIAL NOT NULL PRIMARY KEY,
role_name VARCHAR(128) NOT NULL,
role_desc VARCHAR(512) NOT NULL,
org_id SERIAL NOT NULL REFERENCES organizations(id)
);
CREATE INDEX idx_roles_org_id ON roles(org_id);
-- every org should have an id=0 role which every node is a member of