} // END - if
// Version number
-setThisExtensionVersion('0.5.8');
+setThisExtensionVersion('0.5.9');
// Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8'));
+setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9'));
// Keep this extension always active!
setExtensionAlwaysActive('Y');
break;
case '0.3.6': // SQL queries for v0.3.6
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` DROP INDEX `userid`');
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` ADD UNIQUE `userid_catid` (`userid`, `cat_id`)');
+ addExtensionDropTableIndexSql('user_cats', 'userid`');
+ addExtensionAddTableUniqueSql('user_cats', 'userid_catid', '(`userid`, `cat_id`)');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet.");
addDropTableSql('subid_log');
addCreateTableSql('subid_log', "
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`refid` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
`subid` VARCHAR(255) NOT NULL DEFAULT '',
`referral_url` TINYTEXT NOT NULL,
`remote_address` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
// For saving used subid in user_data table
addExtensionAddTableColumnSql('user_data', 'subid', 'VARCHAR(255) NULL DEFAULT NULL');
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD INDEX (`subid`)');
+ addExtensionAddTableIndexSql('user_data', 'subid', '(`subid`)');
// Configuration entry for purging old subid logs (7 days default)
addConfigAddSql('user_subid_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Bereinigung von Sub-Ids und deren Einstellungen hinzugefügt.");
break;
+
+ case '0.5.9': // SQL queries for v0.5.9
+ addExtensionChangeTableColumnSql('subid_log', 'refid', 'refid', 'BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionChangeTableColumnSql('user_stats', 'cat_id', 'cat_id', 'BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionChangeTableColumnSql('user_stats', 'payment_id', 'payment_id', 'BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionChangeTableColumnSql('user_stats', 'pool_id', 'pool_id', 'BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_subid_log` SET `refid`=NULL WHERE `refid`=0');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `cat_id`=NULL WHERE `cat_id`=0');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `payment_id`=NULL WHERE `payment_id`=0');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `pool_id`=NULL WHERE `pool_id`=0');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Besser NULL anstelle 0.");
+ break;
} // END - switch
break;