diff options
| author | Emma Terzioglu <emreterzioglu49@gmail.com> | 2026-03-13 13:49:15 -0700 |
|---|---|---|
| committer | Emma Terzioglu <emreterzioglu49@gmail.com> | 2026-03-13 13:49:15 -0700 |
| commit | 7a33856a527aebbd8d2a624c6d5937c25c9a1d90 (patch) | |
| tree | 855c642394e7ba1de40b8bb8737be12bec0aedaf /migrations | |
initial commit
new website repo yay!!!
Diffstat (limited to 'migrations')
| -rw-r--r-- | migrations/20260220_54f544_down_23d05a.sql | 2 | ||||
| -rw-r--r-- | migrations/20260220_54f544_up_23d05a.sql | 2 | ||||
| -rw-r--r-- | migrations/20260220_initial_down_54f544.sql | 3 | ||||
| -rw-r--r-- | migrations/20260220_initial_up_54f544.sql | 22 | ||||
| -rw-r--r-- | migrations/20260221_23d05a_down_4ea018.sql | 1 | ||||
| -rw-r--r-- | migrations/20260221_23d05a_up_4ea018.sql | 5 | ||||
| -rw-r--r-- | migrations/20260223_4ea018_down_2597a8.sql | 3 | ||||
| -rw-r--r-- | migrations/20260223_4ea018_up_2597a8.sql | 3 | ||||
| -rw-r--r-- | migrations/20260305_2597a8_down_ae79e1.sql | 0 | ||||
| -rw-r--r-- | migrations/20260305_2597a8_up_ae79e1.sql | 0 |
10 files changed, 41 insertions, 0 deletions
diff --git a/migrations/20260220_54f544_down_23d05a.sql b/migrations/20260220_54f544_down_23d05a.sql new file mode 100644 index 0000000..66a4761 --- /dev/null +++ b/migrations/20260220_54f544_down_23d05a.sql @@ -0,0 +1,2 @@ +ALTER TABLE posts DROP COLUMN public; +ALTER TABLE videos DROP COLUMN public; diff --git a/migrations/20260220_54f544_up_23d05a.sql b/migrations/20260220_54f544_up_23d05a.sql new file mode 100644 index 0000000..c9464cb --- /dev/null +++ b/migrations/20260220_54f544_up_23d05a.sql @@ -0,0 +1,2 @@ +ALTER TABLE posts ADD COLUMN public BOOLEAN; +ALTER TABLE videos ADD COLUMN public BOOLEAN; diff --git a/migrations/20260220_initial_down_54f544.sql b/migrations/20260220_initial_down_54f544.sql new file mode 100644 index 0000000..4ad9128 --- /dev/null +++ b/migrations/20260220_initial_down_54f544.sql @@ -0,0 +1,3 @@ +DROP TABLE IF EXISTS posts; +DROP TABLE IF EXISTS videos; +DROP TABLE IF EXISTS comments; diff --git a/migrations/20260220_initial_up_54f544.sql b/migrations/20260220_initial_up_54f544.sql new file mode 100644 index 0000000..2aa3686 --- /dev/null +++ b/migrations/20260220_initial_up_54f544.sql @@ -0,0 +1,22 @@ +CREATE TABLE IF NOT EXISTS posts ( + id UUID PRIMARY KEY DEFAULT uuidv7(), + text TEXT NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS videos ( + id UUID PRIMARY KEY DEFAULT uuidv7(), + source TEXT NOT NULL, + title TEXT NOT NULL, + description TEXT, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS comments ( + id UUID PRIMARY KEY DEFAULT uuidv7(), + post_id UUID REFERENCES posts, + video_id UUID REFERENCES videos, + author TEXT NOT NULL, + text TEXT NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); diff --git a/migrations/20260221_23d05a_down_4ea018.sql b/migrations/20260221_23d05a_down_4ea018.sql new file mode 100644 index 0000000..d1c4c6f --- /dev/null +++ b/migrations/20260221_23d05a_down_4ea018.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS admin_logins; diff --git a/migrations/20260221_23d05a_up_4ea018.sql b/migrations/20260221_23d05a_up_4ea018.sql new file mode 100644 index 0000000..b1c357a --- /dev/null +++ b/migrations/20260221_23d05a_up_4ea018.sql @@ -0,0 +1,5 @@ +CREATE TABLE IF NOT EXISTS admin_logins ( + id UUID PRIMARY KEY DEFAULT uuidv7(), + ipaddr INET NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); diff --git a/migrations/20260223_4ea018_down_2597a8.sql b/migrations/20260223_4ea018_down_2597a8.sql new file mode 100644 index 0000000..29c81d9 --- /dev/null +++ b/migrations/20260223_4ea018_down_2597a8.sql @@ -0,0 +1,3 @@ +ALTER TABLE posts DROP COLUMN title; +ALTER TABLE posts DROP COLUMN description; +ALTER TABLE posts DROP COLUMN original; diff --git a/migrations/20260223_4ea018_up_2597a8.sql b/migrations/20260223_4ea018_up_2597a8.sql new file mode 100644 index 0000000..ca00628 --- /dev/null +++ b/migrations/20260223_4ea018_up_2597a8.sql @@ -0,0 +1,3 @@ +ALTER TABLE posts ADD COLUMN title TEXT NOT NULL; +ALTER TABLE posts ADD COLUMN description TEXT; +ALTER TABLE posts ADD COLUMN original TEXT NOT NULL; diff --git a/migrations/20260305_2597a8_down_ae79e1.sql b/migrations/20260305_2597a8_down_ae79e1.sql new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/migrations/20260305_2597a8_down_ae79e1.sql diff --git a/migrations/20260305_2597a8_up_ae79e1.sql b/migrations/20260305_2597a8_up_ae79e1.sql new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/migrations/20260305_2597a8_up_ae79e1.sql |
