REFACTOR: Moved user routes into user blueprint, and grouped them, fixed some (not all) routes
This commit is contained in:
Binary file not shown.
@@ -131,4 +131,8 @@ INSERT INTO follows (user_id, followed_id, since) VALUES
|
||||
INSERT INTO followed_categories (user_id, category_id) VALUES
|
||||
(7, 1),
|
||||
(7, 2),
|
||||
(7, 3);
|
||||
(7, 3);
|
||||
|
||||
INSERT INTO subscribes (user_id, subscribed_id, since, expires) VALUES
|
||||
(7, 1, '2024-08-30', '2025-02-28'),
|
||||
(7, 2, '2024-08-30', '2025-02-15');
|
||||
@@ -46,7 +46,7 @@ CREATE TABLE subscribes
|
||||
subscribed_id INTEGER NOT NULL,
|
||||
since DATETIME NOT NULL,
|
||||
expires DATETIME NOT NULL,
|
||||
PRIMARY KEY (user_id),
|
||||
PRIMARY KEY (user_id, subscribed_id),
|
||||
FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (subscribed_id) REFERENCES users(user_id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user