UPDATE: Added followed_categories to db to track users following stream categories

This commit is contained in:
JustIceO7
2025-01-29 03:02:52 +00:00
parent e4a8ba9900
commit 46c7ca3f10
2 changed files with 10 additions and 0 deletions

Binary file not shown.

View File

@@ -53,3 +53,13 @@ CREATE TABLE subscribes
FOREIGN KEY(subscribed_id) REFERENCES users(user_id) ON DELETE CASCADE
);
DROP TABLE IF EXISTS followed_categories;
CREATE TABLE followed_categories
(
user_id INTEGER NOT NULL,
category_id INTEGER NOT NULL,
PRIMARY KEY (user_id, category_id),
FOREIGN KEY(user_id) REFERENCES users(user_id) ON DELETE CASCADE,
FOREIGN KEY(category_id) REFERENCES categories(category_id) ON DELETE CASCADE
);