Skip to content

Commit

Permalink
fix #1 change tinyint(1) to int(11) for tickets_id
Browse files Browse the repository at this point in the history
  • Loading branch information
flegastelois committed Apr 13, 2017
1 parent 5179e61 commit 59057f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
9 changes: 8 additions & 1 deletion inc/ticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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();
}
}

Expand Down
4 changes: 4 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
<author>TECLIB'</author>
</authors>
<versions>
<version>
<num>1.0.1</num>
<compatibility>9.1.2</compatibility>
</version>
<version>
<num>1.0.0</num>
<compatibility>9.1.2</compatibility>
Expand Down
2 changes: 1 addition & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
--------------------------------------------------------------------------
*/

define('PLUGIN_CREDIT_VERSION', '1.0.0');
define('PLUGIN_CREDIT_VERSION', '1.0.1');

/**
* Init hooks of the plugin.
Expand Down

0 comments on commit 59057f9

Please sign in to comment.