From b7bb80cbe0b04f004c045fbaaec9cffe3dc7b377 Mon Sep 17 00:00:00 2001 From: swag Date: Sun, 19 Dec 2021 18:31:41 -0500 Subject: [PATCH] Increase message body limit --- guestbook-ng.pl | 2 +- migrations/2/down.sql | 2 ++ migrations/2/up.sql | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 migrations/2/down.sql create mode 100644 migrations/2/up.sql diff --git a/guestbook-ng.pl b/guestbook-ng.pl index aea8fd9..1bcdda1 100755 --- a/guestbook-ng.pl +++ b/guestbook-ng.pl @@ -77,6 +77,6 @@ app->secrets(app->config->{'secrets'}) || die $@; app->message->max_posts(app->config->{'max_posts'}) if app->config->{'max_posts'}; -app->pg->migrations->from_dir('migrations')->migrate(1); +app->pg->migrations->from_dir('migrations')->migrate(2); app->start(); diff --git a/migrations/2/down.sql b/migrations/2/down.sql new file mode 100644 index 0000000..98b3dc4 --- /dev/null +++ b/migrations/2/down.sql @@ -0,0 +1,2 @@ +ALTER TABLE messages +ALTER COLUMN msg TYPE VARCHAR(255); diff --git a/migrations/2/up.sql b/migrations/2/up.sql new file mode 100644 index 0000000..c7070e3 --- /dev/null +++ b/migrations/2/up.sql @@ -0,0 +1,2 @@ +ALTER TABLE messages +ALTER COLUMN msg TYPE VARCHAR(512);