// Shall we run it?
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ', tableArray[3]=' . $tableArray[3] . ',keyName=' . $keyName);
- if (($tableArray[3] == 'ADD') && (!isSqlTableIndexFound($tableName, $keyName))) {
+ if (($tableArray[3] == 'ADD') && (!ifSqlTableIndexExist($tableName, $keyName))) {
// Send it to the SQL_QUERY() function to add it
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sql=' . $sql . ' - ADDING!');
$result = SQL_QUERY($sql, $F, $L, $enableCodes);
- } elseif (($tableArray[3] == 'DROP') && (isSqlTableIndexFound($tableName, $keyName))) {
+ } elseif (($tableArray[3] == 'DROP') && (ifSqlTableIndexExist($tableName, $keyName))) {
// Send it to the SQL_QUERY() function to drop it
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sql=' . $sql . ' - DROPPING!');
$result = SQL_QUERY($sql, $F, $L, $enableCodes);
}
// Checks depending on the mode if the index is there
-function isSqlTableIndexFound ($tableName, $keyName) {
+function ifSqlTableIndexExist ($tableName, $keyName) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',columnName=' . $keyName . ' - ENTERED!');
// Is there cache?
if (!isset($GLOBALS[__FUNCTION__][$tableName][$keyName])) {
break;
case '0.9.2': // SQL queries for v0.9.2
- addExtensionChangeTableColumnSql('user_data', 'bonus_ral_en_notify` `bonus_ralley_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
- addExtensionChangeTableColumnSql('user_data', 'bonus_ral_di_notify` `bonus_ralley_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
- addExtensionChangeTableColumnSql('user_data', 'bonus_ral_notify` `bonus_rallley_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addExtensionChangeTableColumnSql('user_data', 'bonus_ral_en_notify', 'bonus_ralley_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addExtensionChangeTableColumnSql('user_data', 'bonus_ral_di_notify', 'bonus_ralley_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addExtensionChangeTableColumnSql('user_data', 'bonus_ral_notify', 'bonus_rallley_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// Update notes
setExtensionUpdateNotes("Umbenannt nach neuer Konvention (bitte Einstellungen kontrollieren).");
break;
case '0.6.8': // SQL queries for v0.6.8
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` CHANGE `action` `action` VARCHAR(50) NOT NULL');
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` CHANGE `what` `what` VARCHAR(50) NULL DEFAULT NULL');
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` CHANGE `action` `action` VARCHAR(50) NOT NULL');
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` CHANGE `what` `what` VARCHAR(50) NULL DEFAULT NULL');
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` CHANGE `action` `action` VARCHAR(50) NOT NULL');
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` CHANGE `what` `what` VARCHAR(50) NULL DEFAULT NULL');
+ addExtensionChangeTableColumnSql('admin_menu', 'action', 'action` VARCHAR(50) NOT NULL');
+ addExtensionChangeTableColumnSql('admin_menu', 'what', 'what` VARCHAR(50) NULL DEFAULT NULL');
+ addExtensionChangeTableColumnSql('guest_menu', 'action', 'action` VARCHAR(50) NOT NULL');
+ addExtensionChangeTableColumnSql('admin_menu', 'what', 'what` VARCHAR(50) NULL DEFAULT NULL');
+ addExtensionChangeTableColumnSql('member_menu', 'action', 'action` VARCHAR(50) NOT NULL');
+ addExtensionChangeTableColumnSql('admin_menu', 'what', 'what` VARCHAR(50) NULL DEFAULT NULL');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Spalten verkürzt, damit die Schlüssel passen.");