- switch (getCurrentExtensionVersion())
- {
- case '0.1.0': // SQL queries for v0.1
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_unconfirmed_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'");
- addAdminMenuSql('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.',12);
- addAdminMenuSql('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.',10);
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `ap_notified` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ switch (getCurrentExtensionVersion()) {
+ case '0.1.0': // SQL queries for v0.1.0
+ // Add dependency to 'user'
+ addExtensionDependency('user');
+
+ // SQL queries
+ addConfigAddSql('autopurge_inactive', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ addConfigAddSql('autopurge_unconfirmed', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ addConfigAddSql('ap_inactive_since', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 2592000');
+ addConfigAddSql('ap_inactive_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 25200');
+ addConfigAddSql('ap_unconfirmed_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 432000');
+ addAdminMenuSql('setup', 'config_autopurge', 'Auto-Löschung', 'Automatisch inaktive oder nicht bestätigte Accounts löschen.', 12);
+ addAdminMenuSql('user', 'list_autopurge', 'Inaktive finden', 'Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.', 10);
+ addExtensionAddTableColumnSql('user_data', 'ap_notified', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');