fix default of TEXT column, propperly set date column

TEXT columns can't have a default value in all versions of mysql. Set
a properly formated date string instead of '0' when inserting the
default users.
This commit is contained in:
Uwe Steinmann 2014-01-07 07:54:26 +01:00
parent 0ad0410404
commit a1cea0f593

View File

@ -39,7 +39,7 @@ CREATE TABLE `tblAttributeDefinitions` (
`minvalues` int(11) NOT NULL default '0',
`maxvalues` int(11) NOT NULL default '0',
`valueset` text default NULL,
`regex` text DEFAULT '',
`regex` text default NULL,
UNIQUE(`name`),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -126,7 +126,7 @@ CREATE TABLE `tblFolders` (
`parent` int(11) default NULL,
`folderList` text NOT NULL,
`comment` text,
`date` int(12) default NULL,
`date` int(12) default NULL,
`owner` int(11) default NULL,
`inheritAccess` tinyint(1) NOT NULL default '1',
`defaultAccess` tinyint(4) NOT NULL default '0',
@ -708,8 +708,8 @@ CREATE TABLE `tblVersion` (
-- Initial content for database
--
INSERT INTO tblUsers VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Administrator', 'address@server.com', '', '', '', 1, 0, '', 0, 0, 0);
INSERT INTO tblUsers VALUES (2, 'guest', NULL, 'Guest User', NULL, '', '', '', 2, 0, '', 0, 0, 0);
INSERT INTO tblUsers VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Administrator', 'address@server.com', '', '', '', 1, 0, '0000-00-00 00:00:00', 0, 0, 0);
INSERT INTO tblUsers VALUES (2, 'guest', NULL, 'Guest User', NULL, '', '', '', 2, 0, '0000-00-00 00:00:00', 0, 0, 0);
INSERT INTO tblFolders VALUES (1, 'DMS', 0, '', 'DMS root', UNIX_TIMESTAMP(), 1, 0, 2, 0);
INSERT INTO tblVersion VALUES (NOW(), 4, 3, 0);
INSERT INTO tblCategory VALUES (0, '');