-
Notifications
You must be signed in to change notification settings - Fork 27
/
conference.sql
46 lines (41 loc) · 1.72 KB
/
conference.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
CREATE TABLE base.conference (
conference_id SERIAL NOT NULL,
acronym TEXT NOT NULL UNIQUE,
title TEXT NOT NULL,
subtitle TEXT,
conference_phase TEXT NOT NULL DEFAULT 'chaos',
venue TEXT,
city TEXT,
country TEXT,
timezone TEXT NOT NULL DEFAULT 'Europe/Berlin',
currency TEXT,
timeslot_duration INTERVAL NOT NULL DEFAULT '1:00:00',
default_timeslots INTEGER NOT NULL DEFAULT 1,
max_timeslot_duration INTEGER NOT NULL DEFAULT 10,
day_change TIME WITHOUT TIME ZONE NOT NULL DEFAULT '0:00:00',
remark TEXT,
homepage TEXT,
abstract_length INTEGER,
description_length INTEGER,
export_base_url TEXT,
schedule_html_include TEXT,
feedback_base_url TEXT,
css TEXT,
email TEXT,
f_feedback_enabled BOOL NOT NULL DEFAULT FALSE,
f_submission_enabled BOOL NOT NULL DEFAULT FALSE,
f_submission_new_events BOOL NOT NULL DEFAULT FALSE,
f_submission_writable BOOL NOT NULL DEFAULT FALSE,
f_visitor_enabled BOOL NOT NULL DEFAULT FALSE,
f_reconfirmation_enabled BOOL NOT NULL DEFAULT FALSE
);
CREATE TABLE conference (
FOREIGN KEY (conference_phase) REFERENCES conference_phase (conference_phase) ON UPDATE CASCADE ON DELETE RESTRICT,
FOREIGN KEY (country) REFERENCES country (country) ON UPDATE CASCADE ON DELETE SET NULL,
FOREIGN KEY (timezone) REFERENCES timezone (timezone) ON UPDATE CASCADE ON DELETE SET NULL,
FOREIGN KEY (currency) REFERENCES currency (currency) ON UPDATE CASCADE ON DELETE SET NULL,
PRIMARY KEY (conference_id)
) INHERITS( base.conference );
CREATE TABLE log.conference() INHERITS( base.logging, base.conference );
CREATE INDEX log_conference_conference_id_idx ON log.conference( conference_id );
CREATE INDEX log_conference_log_transaction_id_idx ON log.conference( log_transaction_id );