From 59057f9eaf81d23364b4b2f4513d02ab3b89ae50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Legastelois?= Date: Thu, 13 Apr 2017 08:37:19 +0200 Subject: [PATCH] fix #1 change tinyint(1) to int(11) for tickets_id --- inc/ticket.class.php | 9 ++++++++- plugin.xml | 4 ++++ setup.php | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/inc/ticket.class.php b/inc/ticket.class.php index 85bc135..47f3e17 100644 --- a/inc/ticket.class.php +++ b/inc/ticket.class.php @@ -554,7 +554,7 @@ static function install(Migration $migration) { $query = "CREATE TABLE IF NOT EXISTS `$table` ( `id` int(11) NOT NULL auto_increment, - `tickets_id` tinyint(1) NOT NULL DEFAULT '0', + `tickets_id` int(11) NOT NULL DEFAULT '0', `plugin_credit_entities_id` tinyint(1) NOT NULL DEFAULT '0', `date_creation` datetime DEFAULT NULL, `consumed` int(11) NOT NULL DEFAULT '0', @@ -567,6 +567,13 @@ static function install(Migration $migration) { KEY `users_id` (`users_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"; $DB->query($query) or die($DB->error()); + } else { + + // Fix #1 in 1.0.1 : change tinyint(1) to int(11) for tickets_id + $migration->changeField($table, 'tickets_id', 'tickets_id', 'integer'); + + //execute the whole migration + $migration->executeMigration(); } } diff --git a/plugin.xml b/plugin.xml index 764f000..32e29d7 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,6 +22,10 @@ TECLIB' + + 1.0.1 + 9.1.2 + 1.0.0 9.1.2 diff --git a/setup.php b/setup.php index 60dee77..5432a54 100644 --- a/setup.php +++ b/setup.php @@ -26,7 +26,7 @@ -------------------------------------------------------------------------- */ -define('PLUGIN_CREDIT_VERSION', '1.0.0'); +define('PLUGIN_CREDIT_VERSION', '1.0.1'); /** * Init hooks of the plugin.