FEAT: Change Catagories to a list
Build, Push and Deploy CMS / build-push-deploy (push) Successful in 2m17s

This commit is contained in:
FahdShalhoub
2026-08-16 22:29:35 +03:00
parent 96cabc5716
commit 724351c271
7 changed files with 126 additions and 65 deletions
@@ -0,0 +1,3 @@
DROP TABLE video_categories;
ALTER TABLE videos ADD COLUMN category_id SMALLINT REFERENCES categories(id);
@@ -0,0 +1,7 @@
ALTER TABLE videos DROP COLUMN category_id;
CREATE TABLE video_categories (
video_id UUID NOT NULL REFERENCES videos(id) ON DELETE CASCADE,
category_id SMALLINT NOT NULL REFERENCES categories(id),
PRIMARY KEY (video_id, category_id)
);