-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtables.sql
More file actions
63 lines (58 loc) · 1.25 KB
/
tables.sql
File metadata and controls
63 lines (58 loc) · 1.25 KB
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
62
63
-- create users table
CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
name VARCHAR(255),
email VARCHAR(255),
password VARCHAR(255),
admin BOOLEAN,
img VARCHAR(500)
);
-- create clubs table
CREATE TABLE IF NOT EXISTS clubs (
id SERIAL PRIMARY KEY,
user_id INTEGER,
name VARCHAR(255),
img VARCHAR(500),
location VARCHAR(255),
postal_code INTEGER,
description TEXT
);
-- create bookmarks table
CREATE TABLE IF NOT EXISTS bookmarks (
id SERIAL PRIMARY KEY,
user_id INTEGER,
club_id INTEGER,
name VARCHAR(255),
location VARCHAR(255),
postal_code INTEGER,
img VARCHAR(255)
);
-- create reviews table
CREATE TABLE IF NOT EXISTS reviews (
id SERIAL PRIMARY KEY,
user_id INTEGER,
club_id INTEGER,
price INTEGER,
size INTEGER,
music INTEGER,
model INTEGER,
singer INTEGER,
crowd INTEGER,
customer_svc INTEGER,
overall DECIMAL
);
-- create comments table
CREATE TABLE IF NOT EXISTS comments (
id SERIAL PRIMARY KEY,
review_id INTEGER,
user_id INTEGER,
message TEXT,
date TIMESTAMP
);
-- create likes table
CREATE TABLE IF NOT EXISTS likes (
id SERIAL PRIMARY KEY,
club_id INTEGER,
user_id INTEGER,
total INTEGER
);