Bug 23797: Apply DB changes to kohastructure.sql
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 23 Jul 2020 08:50:27 +0000 (10:50 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 23 Jul 2020 09:33:34 +0000 (11:33 +0200)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl

index 49cdb3b..6f2f955 100644 (file)
@@ -1719,7 +1719,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
index c809a04..6e52d23 100755 (executable)
@@ -22439,7 +22439,7 @@ if( CheckVersion( $DBversion ) ) {
 $DBversion = '20.06.00.014';
 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 values" );
 }