Skip to content
Snippets Groups Projects
Select Git revision
  • 96a91b63c63eb721e51e8ce16465fd38d3476626
  • master default
  • zs2021
  • zs1920
4 results

Makefile

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