mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-15 21:41:43 +00:00
be1389420b
* SQL format checking, 1. * SQL format checking, 2. * SQL format checking, 3. * SQL format checking, 4. * SQL format checking, 5. * Running pg_format * Getting rid of comment. * Upping pg_format version. * Using git ls-files for sql format check. * Fixing sql lints. * Addressing PR comments.
36 lines
749 B
SQL
36 lines
749 B
SQL
CREATE TABLE category (
|
|
id serial PRIMARY KEY,
|
|
name varchar(100) NOT NULL UNIQUE
|
|
);
|
|
|
|
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;
|
|
|