Select Git revision
-
Martin Mareš authoredMartin Mareš authored
db.ddl 1008 B
CREATE TABLE zoom_users (
uid serial PRIMARY KEY,
user_id varchar(255) UNIQUE NOT NULL, -- Zoom's
email varchar(255) NOT NULL,
full_name varchar(255) NOT NULL
);
CREATE TABLE zoom_meetings (
mid serial PRIMARY KEY,
meeting_id bigint UNIQUE NOT NULL, -- Zoom's meeting ID
uuid varchar(255) NOT NULL, -- Zoom's meeting instance ID
host_uid int NOT NULL REFERENCES zoom_users(uid) ON DELETE CASCADE,
topic varchar(255) DEFAULT '',
type int NOT NULL -- 1=instant, 2=scheduled, 3=recurring no time, 8=recurring fixed time
);
CREATE TABLE zoom_schedule (
id serial PRIMARY KEY,
mid bigint NOT NULL REFERENCES zoom_meetings(mid) ON DELETE CASCADE,
occurrence_id bigint DEFAULT 0, -- Occurrence for recurring meetings, 0 otherwise
start_time timestamp NOT NULL,
duration int NOT NULL, -- minutes
UNIQUE(mid, occurrence_id)
);
CREATE TABLE zoom_events (
id serial PRIMARY KEY,
time timestamp NOT NULL DEFAULT NOW(),
event varchar(255) NOT NULL,
js jsonb NOT NULL
);