From 2af783940a7e43be1a9551d715cb096da655d133 Mon Sep 17 00:00:00 2001 From: swag Date: Tue, 4 Jan 2022 22:05:51 -0500 Subject: [PATCH] Increase message size and use wrapping for message dispaly --- assets/css/swagg.css | 2 +- guestbook-ng.pl | 2 +- migrations/7/down.sql | 2 ++ migrations/7/up.sql | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 migrations/7/down.sql create mode 100644 migrations/7/up.sql diff --git a/assets/css/swagg.css b/assets/css/swagg.css index 766f314..7dbbb23 100644 --- a/assets/css/swagg.css +++ b/assets/css/swagg.css @@ -102,7 +102,7 @@ article { article .message.field { font-family: cursive; margin-bottom: 0em; - white-space: pre; + white-space: pre-wrap; } article h3 { diff --git a/guestbook-ng.pl b/guestbook-ng.pl index 8a1db90..a9d8995 100755 --- a/guestbook-ng.pl +++ b/guestbook-ng.pl @@ -112,7 +112,7 @@ 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(6); +app->pg->migrations->from_dir('migrations')->migrate(7); app->asset->store->paths(['assets']); app->asset->process('swagg.css', 'css/swagg.css'); diff --git a/migrations/7/down.sql b/migrations/7/down.sql new file mode 100644 index 0000000..80f260c --- /dev/null +++ b/migrations/7/down.sql @@ -0,0 +1,2 @@ +ALTER TABLE messages +ALTER COLUMN message TYPE VARCHAR(512); diff --git a/migrations/7/up.sql b/migrations/7/up.sql new file mode 100644 index 0000000..f9bd786 --- /dev/null +++ b/migrations/7/up.sql @@ -0,0 +1,2 @@ +ALTER TABLE messages +ALTER COLUMN message TYPE VARCHAR(2048);