[Koha-patches] [PATCH] Bug 16664: fix loaded SQL for strictness

Srdjan srdjan at catalyst.net.nz
Wed Jul 6 04:41:21 CEST 2016


From: Robin Sheat <robin at kallisti.net.nz>

There were some errors in the SQL structure that MySQL got upset at in
strict mode. This lets the file load.

Signed-off-by: Srdjan <srdjan at catalyst.net.nz>
---
 installer/data/mysql/kohastructure.sql | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql
index 4612a17..867b74e 100644
--- a/installer/data/mysql/kohastructure.sql
+++ b/installer/data/mysql/kohastructure.sql
@@ -69,7 +69,7 @@ CREATE TABLE `auth_subfield_structure` (
   `linkid` tinyint(1) NOT NULL default 0,
   `kohafield` varchar(45) NULL default '',
   `frameworkcode` varchar(10) NOT NULL default '',
-  `defaultvalue` TEXT DEFAULT '',
+  `defaultvalue` TEXT,
   PRIMARY KEY  (`authtypecode`,`tagfield`,`tagsubfield`),
   KEY `tab` (`authtypecode`,`tab`),
   CONSTRAINT `auth_subfield_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE
@@ -2211,7 +2211,7 @@ CREATE TABLE `virtualshelves` ( -- information about lists (or virtual shelves)
   `category` varchar(1) default NULL, -- type of list (private [1], public [2])
   `sortfield` varchar(16) default 'title', -- the field this list is sorted on
   `lastmodified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time the list was last modified
-  `created_on` TIMESTAMP NOT NULL, -- creation time
+  `created_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- creation time
   `allow_add` tinyint(1) default 0, -- permission for adding entries to list
   `allow_delete_own` tinyint(1) default 1, -- permission for deleting entries frm list that you added yourself
   `allow_delete_other` tinyint(1) default 0, -- permission for deleting entries from list that another person added
-- 
2.7.4


More information about the Koha-patches mailing list