do not set TEXT field to default ''. Use NULL instead

mysql STRICT_TRANS_MODE does not allow it
This commit is contained in:
Uwe Steinmann 2016-08-08 08:09:01 +02:00
parent 284ee2bba1
commit 5f1d38bba3
4 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ CREATE TABLE `tblAttributeDefinitions` (
`minvalues` INTEGER NOT NULL default '0', `minvalues` INTEGER NOT NULL default '0',
`maxvalues` INTEGER NOT NULL default '0', `maxvalues` INTEGER NOT NULL default '0',
`valueset` TEXT default NULL, `valueset` TEXT default NULL,
`regex` TEXT DEFAULT '', `regex` TEXT DEFAULT NULL,
UNIQUE(`name`) UNIQUE(`name`)
) ; ) ;

View File

@ -12,7 +12,7 @@ ALTER TABLE tblDocumentContent ADD COLUMN `checksum` char(32);
ALTER TABLE tblUsers ADD COLUMN `quota` bigint; ALTER TABLE tblUsers ADD COLUMN `quota` bigint;
ALTER TABLE tblSessions ADD COLUMN `clipboard` text DEFAULT ''; ALTER TABLE tblSessions ADD COLUMN `clipboard` text DEFAULT NULL;
CREATE TABLE tblWorkflowStates ( CREATE TABLE tblWorkflowStates (
`id` int(11) NOT NULL auto_increment, `id` int(11) NOT NULL auto_increment,

View File

@ -1,8 +1,8 @@
BEGIN; BEGIN;
ALTER TABLE tblSessions ADD COLUMN `splashmsg` TEXT DEFAULT ''; ALTER TABLE tblSessions ADD COLUMN `splashmsg` TEXT DEFAULT NULL;
ALTER TABLE tblAttributeDefinitions ADD COLUMN `regex` TEXT DEFAULT ''; ALTER TABLE tblAttributeDefinitions ADD COLUMN `regex` TEXT DEFAULT NULL;
UPDATE tblVersion set major=4, minor=3, subminor=0; UPDATE tblVersion set major=4, minor=3, subminor=0;

View File

@ -1,8 +1,8 @@
START TRANSACTION; START TRANSACTION;
ALTER TABLE tblSessions ADD COLUMN `splashmsg` TEXT DEFAULT ''; ALTER TABLE tblSessions ADD COLUMN `splashmsg` TEXT DEFAULT NULL;
ALTER TABLE tblAttributeDefinitions ADD COLUMN `regex` TEXT DEFAULT ''; ALTER TABLE tblAttributeDefinitions ADD COLUMN `regex` TEXT DEFAULT NULL;
UPDATE tblVersion set major=4, minor=3, subminor=0; UPDATE tblVersion set major=4, minor=3, subminor=0;