From f56e996fb1d55bfcd0dd89675ac4606db97dbae1 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Thu, 24 Aug 2023 19:12:26 -0400 Subject: [PATCH] Undo this, doesn't do anything useful --- lib/PostText.pm | 2 +- migrations/13/down.sql | 7 +++++++ migrations/13/up.sql | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 migrations/13/down.sql create mode 100644 migrations/13/up.sql diff --git a/lib/PostText.pm b/lib/PostText.pm index 108f024..35d7719 100644 --- a/lib/PostText.pm +++ b/lib/PostText.pm @@ -85,7 +85,7 @@ sub startup($self) { # Finish configuring some things $self->secrets($self->config->{'secrets'}) || die $@; - $self->pg->migrations->from_dir('migrations')->migrate(12); + $self->pg->migrations->from_dir('migrations')->migrate(13); if (my $threads_per_page = $self->config->{'threads_per_page'}) { $self->thread->per_page($threads_per_page) diff --git a/migrations/13/down.sql b/migrations/13/down.sql new file mode 100644 index 0000000..ceb7426 --- /dev/null +++ b/migrations/13/down.sql @@ -0,0 +1,7 @@ +ALTER TABLE threads +ALTER COLUMN thread_body + SET NOT NULL; + +ALTER TABLE remarks +ALTER COLUMN remark_body + SET NOT NULL; diff --git a/migrations/13/up.sql b/migrations/13/up.sql new file mode 100644 index 0000000..4c2b3fa --- /dev/null +++ b/migrations/13/up.sql @@ -0,0 +1,9 @@ +-- Nvm this isn't how NULL works in SQL lol + +ALTER TABLE threads +ALTER COLUMN thread_body + DROP NOT NULL; + +ALTER TABLE remarks +ALTER COLUMN remark_body + DROP NOT NULL;