FEAT: Change Catagories to a list
Build, Push and Deploy CMS / build-push-deploy (push) Successful in 2m17s
Build, Push and Deploy CMS / build-push-deploy (push) Successful in 2m17s
This commit is contained in:
@@ -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)
|
||||
);
|
||||
Reference in New Issue
Block a user