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;