-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathufree_dev.sql
37 lines (34 loc) · 1.3 KB
/
ufree_dev.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
CREATE TABLE availability (
id SERIAL NOT NULL PRIMARY KEY,
attendee_id integer NOT NULL,
event_id varchar NOT NULL,
year date,
january varchar(31) DEFAULT '0000000000000000000000000000000',
february varchar(29) DEFAULT '00000000000000000000000000000',
march varchar(31) DEFAULT '0000000000000000000000000000000',
april varchar(30) DEFAULT '000000000000000000000000000000',
may varchar(31) DEFAULT '0000000000000000000000000000000',
june varchar(30) DEFAULT '000000000000000000000000000000',
july varchar(31) DEFAULT '0000000000000000000000000000000',
august varchar(31) DEFAULT '0000000000000000000000000000000',
september varchar(30) DEFAULT '000000000000000000000000000000',
october varchar(31) DEFAULT '0000000000000000000000000000000',
november varchar(30) DEFAULT '000000000000000000000000000000',
december varchar(31) DEFAULT '0000000000000000000000000000000'
);
CREATE TABLE attendee (
id SERIAL NOT NULL PRIMARY KEY,
name varchar(15) NOT NULL,
email varchar(50)
);
CREATE TABLE event (
id varchar NOT NULL,
name varchar(20) NOT NULL,
creator_id integer NOT NULL,
created_date date
);
CREATE TABLE event_attendee (
id SERIAL NOT NULL PRIMARY KEY,
event_id INTEGER REFERENCES event (id),
attendee_id INTEGER REFERENCES attendee (id),
);