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

8 lines
276 B
SQL

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);