trifid/trifid-api/migrations/20230224000741_create_orgs.sql

8 lines
276 B
MySQL
Raw Normal View History

2023-02-24 14:53:32 +00:00
CREATE TABLE organizations (
id SERIAL NOT NULL PRIMARY KEY,
owner SERIAL NOT NULL REFERENCES users(id),
ca_key VARCHAR(3072) NOT NULL,
ca_crt VARCHAR(3072) NOT NULL,
iv VARCHAR(128) NOT NULL
);
CREATE INDEX idx_organizations_owner ON organizations(owner);