From f639bdd02883322fc4605e4aea04f3c23a0feb79 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 22 Apr 2016 12:10:45 -0400 Subject: [PATCH] Avoid zero dates to prevent strict mode errors. --- module/VuFind/sql/mysql.sql | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module/VuFind/sql/mysql.sql b/module/VuFind/sql/mysql.sql index 04727169c83..5b2dfc81d19 100644 --- a/module/VuFind/sql/mysql.sql +++ b/module/VuFind/sql/mysql.sql @@ -38,7 +38,7 @@ CREATE TABLE `comments` ( `user_id` int(11) NOT NULL DEFAULT '0', `resource_id` int(11) NOT NULL DEFAULT '0', `comment` text NOT NULL, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `resource_id` (`resource_id`), @@ -56,7 +56,7 @@ CREATE TABLE `comments` ( CREATE TABLE `oai_resumption` ( `id` int(11) NOT NULL AUTO_INCREMENT, `params` text, - `expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `expires` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -115,7 +115,7 @@ CREATE TABLE `search` ( `user_id` int(11) NOT NULL DEFAULT '0', `session_id` varchar(128) DEFAULT NULL, `folder_id` int(11) DEFAULT NULL, - `created` date NOT NULL DEFAULT '0000-00-00', + `created` date NOT NULL DEFAULT '2000-01-01', `title` varchar(20) DEFAULT NULL, `saved` int(1) NOT NULL DEFAULT '0', `search_object` blob, @@ -137,7 +137,7 @@ CREATE TABLE `session` ( `session_id` varchar(128) DEFAULT NULL, `data` text, `last_used` int(12) NOT NULL DEFAULT '0', - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `session_id` (`session_id`), KEY `last_used` (`last_used`) @@ -177,7 +177,7 @@ CREATE TABLE `user` ( `college` varchar(100) NOT NULL DEFAULT '', `major` varchar(100) NOT NULL DEFAULT '', `home_library` varchar(100) NOT NULL DEFAULT '', - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', `verify_hash` varchar(42) NOT NULL DEFAULT '', PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`) @@ -195,7 +195,7 @@ CREATE TABLE `user_list` ( `user_id` int(11) NOT NULL, `title` varchar(200) NOT NULL, `description` text, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', `public` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `user_id` (`user_id`), @@ -273,7 +273,7 @@ CREATE TABLE `user_card` ( `cat_password` varchar(50) DEFAULT NULL, `cat_pass_enc` varchar(110) DEFAULT NULL, `home_library` varchar(100) NOT NULL DEFAULT '', - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', `saved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), -- GitLab