forked from ztbc68/OCDX-Engine-Group5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DBdefv1.sql
56 lines (52 loc) · 1.43 KB
/
DBdefv1.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
drop schema swedb;
create schema swedb;
drop table if exists swedb.pages;
create table swedb.pages(
pageid serial,
userid integer,
json json,
updatedjson varchar(100),
archivejson varchar(100));
drop table if exists swedb.comment;
create table swedb.comment(
cid serial,
userid integer,
pageid integer,
time timestamp,
content varchar(140));
drop table if exists swedb.users;
create table swedb.users(
userid serial,
email varchar(100),
password varchar(20),
usertype integer,
gender varchar(10),
jobtitle varchar(50),
org varchar(50),
edlevel varchar(50),
fname varchar(50),
lname varchar(50),
city varchar(50),
state varchar(5),
zip integer,
country varchar(50),
phone integer,
banstatus integer);
drop table if exists swedb.stats;
create table swedb.stats(
tid serial,
action varchar(10),
date timestamp,
pageid integer,
timeonpage integer,
updatedjson varchar(100),
archivejson varchar(100),
accepterid integer,
changerid integer,
requestorid integer,
assignedid integer,
reporterid integer,
reporteeid integer,
content varchar(140),
reason varchar(140),
json json);