Skip to content
Snippets Groups Projects
Commit 6d4a8ae4 authored by Martin Mareš's avatar Martin Mareš
Browse files

DB: Cascading deletes

parent 98409a7b
Branches
No related tags found
No related merge requests found
...@@ -9,14 +9,14 @@ CREATE TABLE zoom_meetings ( ...@@ -9,14 +9,14 @@ CREATE TABLE zoom_meetings (
mid serial PRIMARY KEY, mid serial PRIMARY KEY,
meeting_id int UNIQUE NOT NULL, -- Zoom's meeting ID meeting_id int UNIQUE NOT NULL, -- Zoom's meeting ID
uuid varchar(255) NOT NULL, -- Zoom's meeting instance 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 '', topic varchar(255) DEFAULT '',
type int NOT NULL -- 1=instant, 2=scheduled, 3=recurring no time, 8=recurring fixed time type int NOT NULL -- 1=instant, 2=scheduled, 3=recurring no time, 8=recurring fixed time
); );
CREATE TABLE zoom_schedule ( CREATE TABLE zoom_schedule (
id serial PRIMARY KEY, 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 occurrence_id bigint DEFAULT 0, -- Occurrence for recurring meetings, 0 otherwise
start_time timestamp NOT NULL, start_time timestamp NOT NULL,
duration int NOT NULL, -- minutes duration int NOT NULL, -- minutes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment