diff --git a/install/mysql/plugin_formcreator_empty.sql b/install/mysql/plugin_formcreator_empty.sql index 96cd02899..d323e0c19 100644 --- a/install/mysql/plugin_formcreator_empty.sql +++ b/install/mysql/plugin_formcreator_empty.sql @@ -75,7 +75,7 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_formanswers` ( `requester_id` int(11) DEFAULT NULL, `users_id_validator` int(11) NOT NULL DEFAULT '0', `groups_id_validator` int(11) NOT NULL DEFAULT '0', - `request_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `request_date` timestamp NULL, `status` int(11) NOT NULL DEFAULT '101', `validation_percent` int(11) NOT NULL DEFAULT '0', `comment` text, @@ -259,8 +259,8 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_issues` ( `original_id` int(11) NOT NULL DEFAULT '0', `sub_itemtype` varchar(100) NOT NULL DEFAULT '', `status` varchar(255) NOT NULL DEFAULT '', - `date_creation` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `date_mod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date_creation` timestamp NULL, + `date_mod` timestamp NULL, `entities_id` int(11) NOT NULL DEFAULT '0', `is_recursive` tinyint(1) NOT NULL DEFAULT '0', `requester_id` int(11) NOT NULL DEFAULT '0', diff --git a/install/upgrade_to_2.12.php b/install/upgrade_to_2.12.php index 49de7e14c..9af4b0b4f 100644 --- a/install/upgrade_to_2.12.php +++ b/install/upgrade_to_2.12.php @@ -42,11 +42,11 @@ public function upgrade(Migration $migration) { // Convert datetime to timestamp $table = 'glpi_plugin_formcreator_formanswers'; - $migration->changeField($table, 'request_date', 'request_date', 'timestamp'. ' NOT NULL DEFAULT CURRENT_TIMESTAMP'); + $migration->changeField($table, 'request_date', 'request_date', 'timestamp'); $table = 'glpi_plugin_formcreator_issues'; - $migration->changeField($table, 'date_creation', 'date_creation', 'timestamp'. ' NOT NULL DEFAULT CURRENT_TIMESTAMP'); - $migration->changeField($table, 'date_mod', 'date_mod', 'timestamp'. ' NOT NULL DEFAULT CURRENT_TIMESTAMP'); + $migration->changeField($table, 'date_creation', 'date_creation', 'timestamp'); + $migration->changeField($table, 'date_mod', 'date_mod', 'timestamp'); $this->addValidationPercent(); $this->changeDropdownTreeSettings();