From 1667e8b0a3f859b013c4e7e2c28537e9c34627db Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 23 Jul 2020 10:50:27 +0200 Subject: [PATCH] Bug 23797: Apply DB changes to kohastructure.sql Signed-off-by: Jonathan Druart (cherry picked from commit 0edaab49afec96c793477e9e790b4a9d7b6044fe) Signed-off-by: Lucas Gass --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3dbc7a97c0..c6e82bd843 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1717,7 +1717,7 @@ CREATE TABLE `opac_news` ( -- data from the news tool `branchcode` varchar(10) default NULL, -- branch code users to create branch specific news, NULL is every branch. `title` varchar(250) NOT NULL default '', -- title of the news article `content` MEDIUMTEXT NOT NULL, -- the body of your news article - `lang` varchar(25) NOT NULL default '', -- location for the article (koha is the staff client, slip is the circulation receipt and language codes are for the opac) + `lang` varchar(50) NOT NULL default '', -- location for the article (koha is the staff client, slip is the circulation receipt and language codes are for the opac) `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- pulibcation date and time `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible `number` int(11) default NULL, -- the order in which this article appears in that specific location diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index b592efc3c8..66b5af9293 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22320,7 +22320,8 @@ if( CheckVersion( $DBversion ) ) { $DBversion = '20.05.02.006'; if( CheckVersion( $DBversion ) ) { - $dbh->do( "ALTER TABLE opac_news CHANGE lang lang VARCHAR(50)" ); + + $dbh->do( "ALTER TABLE opac_news CHANGE lang lang VARCHAR(50) NOT NULL DEFAULT ''" ); NewVersion( $DBversion, 23797, "Extend the opac_news lang column to accommodate longer value" ); } -- 2.39.5