+
+ 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 INDEX `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.");
+ break;
+
+ case '0.3.7': // SQL queries for v0.3.7
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `id` `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `cat_id` `cat_id` TINYINT(3) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_del` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `stats_id` `stats_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `ref_depth` `ref_depth` TINYINT(3) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `cat_id` `cat_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `payment_id` `payment_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `pool_id` `pool_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats_data` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+
+ // Cleanup SQLs
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid` IS NULL OR `cat_id` IS NULL');
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_del` WHERE `userid` IS NULL');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_links` SET `stats_id`=NULL WHERE `stats_id`=0');
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid` IS NULL');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `ref_depth`=NULL WHERE `ref_depth`=0');
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid` IS NULL');
+ 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');
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid` IS NULL');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("NULL ist wichtiger als 0 und UNSIGNED auch.");
+ break;
+
+ case '0.3.8': // SQL queries for v0.3.8
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `last_failure` `last_failure` TIMESTAMP NULL DEFAULT NULL');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Ausgangswert ist nicht mehr 0000-00-00 00:00:00, sondern einfach NULL.");
+ break;
+
+ case '0.3.9': // SQL queries for v0.3.9
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Update verschoben nach ext-order (da es Werbeguthaben ist und nichts mit dem Mitglied selbst zu tun hat).");
+ break;
+
+ case '0.4.0': // SQL queries for v0.4.0
+ // Register new filters for gathering points
+ registerFilter('get_total_points', 'USER_POINTS', false, true, isExtensionDryRun());
+ registerFilter('get_own_points', 'USER_POINTS', false, true, isExtensionDryRun());
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Filter registriert, die das eigene {?POINTS?}-Guthaben des Mitgliedes zurückliefern.");
+ break;
+
+ case '0.4.1': // SQL queries for v0.4.1
+ // Add special fix include to fix filters
+ addIncludeToPool('extension', 'inc/fix_user_points.php');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Das Mitgliederguthaben musste repariert werden, da für Referral-Ebene 0, noch NULL geschrieben wurde.");
+ break;
+
+ case '0.4.2': // SQL queries for v0.4.2
+ // Add special fix include to fix filters
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='chk_regs' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Überflüssiges Menü <strong>chk_regs</strong> entfernt, dies kann mit <strong>list_user</strong> übernommen werden.");
+ break;
+
+ case '0.4.3': // SQL queries for v0.4.3
+ // Add special fix include to fix filters
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `refid` `refid` BIGINT(20) NULL DEFAULT NULL");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Überflüssiges Menü <strong>chk_regs</strong> entfernt, dies kann mit <strong>list_user</strong> übernommen werden.");
+ break;
+
+ case '0.4.4': // SQL queries for v0.4.4
+ addDropTableSql('user_refs');
+ addCreateTableSql('user_refs', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0,
+`refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+PRIMARY KEY (`id`),
+UNIQUE INDEX `user_refid` (`userid`,`level`,`refid`),
+INDEX (`level`),
+INDEX (`refid`)",
+ 'User referrals');
+
+ // Load ext-refback's special include to regenerate the referral table
+ addIncludeToPool('extension', 'inc/fix_refsystem.php');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Neues Tabellenlayout und verschoben von ext-refback.");
+ break;
+
+ case '0.4.5': // SQL queries for v0.4.5
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `link_type` `link_type` VARCHAR(255) NOT NULL DEFAULT 'NORMAL'");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Die Spalte <strong>link_type</strong> ist nun kein ENUM mehr, um weitere Mailtypen zu erlauben.");
+ break;
+
+ case '0.4.6': // SQL queries for v0.4.6
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='{OPEN_CONFIG}POINTS{CLOSE_CONFIG} gutschreiben' WHERE `what` = 'add_points' LIMIT 1");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='{OPEN_CONFIG}POINTS{CLOSE_CONFIG} abziehen' WHERE `what` = 'sub_points' LIMIT 1");
+ addAdminMenuSql('user','sub_points','{OPEN_CONFIG}POINTS{CLOSE_CONFIG} abziehen','Allen oder einem Mitglied {OPEN_CONFIG}POINTS{CLOSE_CONFIG} abziehen.', 8);
+
+ // This update depends on ext-menu update
+ addExtensionDependency('menu');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Abzug von {?POINTS?} sollte nun dabei sein und Hinzufügen gefixt (war zu kurze Spalte).");
+ break;
+
+ case '0.4.7': // SQL queries for v0.4.7
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `lock_timestamp` `lock_timestamp` TIMESTAMP NULL DEFAULT NULL');
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `lock_timestamp`=NULL WHERE `lock_timestamp`='0000-00-00 00:00:00'");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("0000-00-00 00:00:00 ist kein Standardwert mehr, NULL ist dies.");
+ break;
+ } // END - switch