Initial version
This commit is contained in:
8
migrations/data/001_init.sql
Normal file
8
migrations/data/001_init.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
CREATE TABLE jokes (
|
||||
id SERIAL NOT NULL PRIMARY KEY,
|
||||
joke_text TEXT NOT NULL
|
||||
);
|
||||
|
||||
---- create above / drop below ----
|
||||
|
||||
DROP TABLE jokes;
|
||||
5
migrations/data/002_ts.sql
Normal file
5
migrations/data/002_ts.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE jokes ADD COLUMN ts TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW();
|
||||
|
||||
---- create above / drop below ----
|
||||
|
||||
ALTER TABLE jokes DROP COLUMN ts;
|
||||
5
migrations/data/003_nsfw.sql
Normal file
5
migrations/data/003_nsfw.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE jokes ADD COLUMN nsfw BOOLEAN NOT NULL DEFAULT 'f';
|
||||
|
||||
---- create above / drop below ----
|
||||
|
||||
ALTER TABLE jokes DROP COLUMN nsfw;
|
||||
7
migrations/data/004_votes.sql
Normal file
7
migrations/data/004_votes.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
ALTER TABLE jokes ADD COLUMN up_votes INT NOT NULL DEFAULT 0;
|
||||
ALTER TABLE jokes ADD COLUMN down_votes INT NOT NULL DEFAULT 0;
|
||||
|
||||
---- create above / drop below ----
|
||||
|
||||
ALTER TABLE jokes DROP COLUMN up_votes;
|
||||
ALTER TABLE jokes DROP COLUMN down_votes;
|
||||
Reference in New Issue
Block a user