-PRIMARY KEY(id)
-) TYPE={!_TABLE_TYPE!}");
-
- // Admin menu
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.','9')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzufügen','Neue Ref-Rallye hinzufügen.','1')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, löschen usw.','3')");
-
- // Guest menu
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
-
- // Member menu
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
- break;
-
-case "remove": // Do stuff when removing extension
- // Drop tables
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
-
- // Remove menus
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes'");
-
- // Unregister filter
- UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run);
- break;
-
-case "activate": // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
- break;
-
-case "deactivate": // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
- break;
-
-case "update": // Update an extension
- switch ($EXT_VER)
- {
- case "0.0.1": // SQL queries for v0.0.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD expired ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert.");
- break;
-
- case "0.0.2": // SQL queries for v0.0.2
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Aktueller {!POINTS!}-Stand wird beachtet.");
- break;
-
- case "0.0.6": // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <em>Unknown column 'd.useid' in 'on clause'</em> behoben.");
- break;
-
- case "0.0.7": // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
- break;
-
- case "0.0.8": // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <u>Template nicht gefunden</u> behoben und Admin-Formulare ausgelagert");
- break;
-
- case "0.0.9": // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler <u>Template nicht gefunden</u> ist endlich beseitigt.");
- break;
-
- case "0.1.0": // SQL queries for v0.2.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert.");
- break;
-
- case "0.1.1": // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;