Commit 6d4a8ae4 authored by Martin Mareš's avatar Martin Mareš
Browse files

DB: Cascading deletes

parent 98409a7b
......@@ -9,14 +9,14 @@ CREATE TABLE zoom_meetings (
mid serial PRIMARY KEY,
meeting_id int 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),
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 int NOT NULL REFERENCES zoom_meetings(mid),
mid int 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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment