Bug 23797: (follow-up) Increase the size of opac_news.lang
authorOwen Leonard <oleonard@myacpl.org>
Mon, 29 Jun 2020 13:07:42 +0000 (13:07 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 23 Jul 2020 09:33:34 +0000 (11:33 +0200)
This patch adds a database update to increase the size of the
opac_news.lang column in order to accommodate longer values.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

installer/data/mysql/atomicupdate/bug-23797.perl [new file with mode: 0644]

diff --git a/installer/data/mysql/atomicupdate/bug-23797.perl b/installer/data/mysql/atomicupdate/bug-23797.perl
new file mode 100644 (file)
index 0000000..07b0d8a
--- /dev/null
@@ -0,0 +1,7 @@
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+    $dbh->do( "ALTER TABLE opac_news CHANGE lang lang VARCHAR(50)" );
+
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 23797: Extend the opac_news lang column to accommodate longer values)\n";
+}