Bug 21682: Corrections for strict sql in stockrotationrotas
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 26 Oct 2018 10:55:54 +0000 (11:55 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 1 Nov 2018 19:00:35 +0000 (19:00 +0000)
Test Plan:
1) Ensure you're database is prior to version 18.06.00.040
2) Ensure 'strict_sql_modes' is enabled
3) Run updatedatabase
4) See no errors during upgrade
5) Run a fresh install
6) Note no errors during database installation

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl

index 62c0dce..629bc93 100644 (file)
@@ -4269,9 +4269,9 @@ CREATE TABLE `circulation_rules` (
 --
 
 CREATE TABLE IF NOT EXISTS stockrotationrotas (
-    rota_id int(11) auto_increment,          -- Stockrotation rota ID
+    rota_id int(11) auto_increment,         -- Stockrotation rota ID
     title varchar(100) NOT NULL,            -- Title for this rota
-    description text NOT NULL default '',   -- Description for this rota
+    description text NOT NULL,              -- Description for this rota
     cyclical tinyint(1) NOT NULL default 0, -- Should items on this rota keep cycling?
     active tinyint(1) NOT NULL default 0,   -- Is this rota currently active?
     PRIMARY KEY (`rota_id`)
index cc738c6..e1a95da 100755 (executable)
@@ -16569,7 +16569,7 @@ if( CheckVersion( $DBversion ) ) {
           CREATE TABLE `stockrotationrotas` (
             `rota_id` int(11) auto_increment,         -- Stockrotation rota ID
             `title` varchar(100) NOT NULL,            -- Title for this rota
-            `description` text NOT NULL default '',   -- Description for this rota
+            `description` text NOT NULL,              -- Description for this rota
             `cyclical` tinyint(1) NOT NULL default 0, -- Should items on this rota keep cycling?
             `active` tinyint(1) NOT NULL default 0,   -- Is this rota currently active?
             PRIMARY KEY (`rota_id`),