2023-08-02 16:44:51 +00:00
|
|
|
CREATE TABLE category (
|
|
|
|
id serial PRIMARY KEY,
|
|
|
|
name varchar(100) NOT NULL UNIQUE
|
2021-02-25 12:16:58 +00:00
|
|
|
);
|
|
|
|
|
2023-08-02 16:44:51 +00:00
|
|
|
INSERT INTO category (name)
|
|
|
|
VALUES ('Discussion'),
|
|
|
|
('Humor/Memes'),
|
|
|
|
('Gaming'),
|
|
|
|
('Movies'),
|
|
|
|
('TV'),
|
|
|
|
('Music'),
|
|
|
|
('Literature'),
|
|
|
|
('Comics'),
|
|
|
|
('Photography'),
|
|
|
|
('Art'),
|
|
|
|
('Learning'),
|
|
|
|
('DIY'),
|
|
|
|
('Lifestyle'),
|
|
|
|
('News'),
|
|
|
|
('Politics'),
|
|
|
|
('Society'),
|
|
|
|
('Gender/Identity/Sexuality'),
|
|
|
|
('Race/Colonisation'),
|
|
|
|
('Religion'),
|
|
|
|
('Science/Technology'),
|
|
|
|
('Programming/Software'),
|
|
|
|
('Health/Sports/Fitness'),
|
|
|
|
('Porn'),
|
|
|
|
('Places'),
|
|
|
|
('Meta'),
|
|
|
|
('Other');
|
|
|
|
|
|
|
|
ALTER TABLE community
|
|
|
|
ADD category_id int REFERENCES category ON UPDATE CASCADE ON DELETE CASCADE NOT NULL DEFAULT 1;
|
2021-02-25 12:16:58 +00:00
|
|
|
|