-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.sql
63 lines (51 loc) · 1 KB
/
init.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
create table users
(
uid serial not null
constraint users_pk
primary key,
name text,
email text not null,
phone text,
password text,
major text,
degree text,
enable boolean default true
);
alter table users owner to postgres;
create unique index users_email_uindex
on users (email);
create table sessions
(
sessionid uuid not null
constraint sessions_pk
primary key,
uid integer not null,
start_time timestamp with time zone,
end_time timestamp with time zone
);
alter table sessions owner to postgres;
create table watchlist
(
"ID" integer not null
constraint watchlist_pkey
primary key,
uid integer not null,
"courseID" integer not null
);
alter table watchlist owner to postgres;
create table userevents
(
"eventID" integer,
uid uuid,
data varchar(255),
"createdAt" bigint
);
alter table userevents owner to postgres;
create table events
(
"eventID" integer not null
constraint events_pkey
primary key,
description varchar(255)
);
alter table events owner to postgres;