-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnewfeatures.sql
More file actions
35 lines (31 loc) · 892 Bytes
/
Copy pathnewfeatures.sql
File metadata and controls
35 lines (31 loc) · 892 Bytes
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
-- CREATE USERS_FOLLOWING TBALE--
CREATE TABLE IF NOT EXISTS following(
following_id SERIAL PRIMARY KEY,
user_id INTEGER,
artist_id INTEGER,
FOREIGN KEY (user_id) REFERENCES users(user_id),
FOREIGN KEY (artist_id) REFERENCES artists(artist_id)
);
-- CREATE TABLE IF NOT EXISTS likes(
-- like_id SERIAL PRIMARY KEY,
-- user_id INTEGER,
-- tattoo_id INTEGER,
-- FOREIGN KEY
-- (user_id) REFERENCES users
-- (user_id),
-- FOREIGN KEY
-- (tattoo_id) REFERENCES tattoos
-- (tattoo_id)
-- );
-- INSERT LIKES AND FOLLOWING--
-- INSERT INTO likes (user_id, tattoo_id) VALUES(4, 34);
-- INSERT INTO likes
-- (user_id, tattoo_id)
-- VALUES(4, 33);
-- INSERT INTO likes
-- (user_id, tattoo_id)
-- VALUES(4, 22);
INSERT INTO following (user_id, artist_id) VALUES(4, 12);
INSERT INTO following
(user_id, artist_id)
VALUES(4, 11);