From 9da8998da596cc853894fb6c6feaf4f95536e8c9 Mon Sep 17 00:00:00 2001 From: kevin_fourie Date: Tue, 9 Dec 2008 09:02:16 +0000 Subject: [PATCH] KTC-656 - "DB upgrade fails: DB Error: Constraint violation" Updated. Fixed for 3.5.4 upgrades too now. --- .gitignore | 2 ++ lib/upgrades/UpgradeFunctions.inc.php | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6adf8d9..b9db171 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ plugins/shortcuts/ plugins/wintools/ plugins/updatesandmessages/ var/cache/configcache +bin/luceneserver/lucene.pid +plugins/.gitignore diff --git a/lib/upgrades/UpgradeFunctions.inc.php b/lib/upgrades/UpgradeFunctions.inc.php index 3f9189d..7c95868 100644 --- a/lib/upgrades/UpgradeFunctions.inc.php +++ b/lib/upgrades/UpgradeFunctions.inc.php @@ -62,8 +62,7 @@ class UpgradeFunctions { '3.5.0' => array('cleanupOldKTAdminVersionNotifier', 'updateConfigFile35', 'registerIndexingTasks'), '3.5.2' => array('setStorageEngine','dropForeignKeys','dropPrimaryKeys','dropIndexes','createPrimaryKeys','createForeignKeys','createIndexes', 'removeSlashesFromObjects'), '3.5.3' => array('moveConfigSettingsToDB','removeAdminVersionNotifier','removeOldSearchPlugins','addAutoIncrementToTables', 'addAutoIncrementToTables2'), - '3.5.4' => array('createIndexes'), - '3.5.4' => array('createIndexes', 'updateServerConfigSettings','removeOldFilesAndFolders354') + '3.5.4' => array('createIndexes', 'updateServerConfigSettings','removeOldFilesAndFolders354','removeOldFilesAndFolders354a') ); var $descriptions = array( @@ -99,6 +98,7 @@ class UpgradeFunctions { 'removeOldSearchPlugins' => 'Remove the old Search Plugins.', 'addAutoIncrementToTables' => 'Update all current db tables to use auto_increment.', 'removeOldFilesAndFolders354' => 'Remove old files and folders that are no longer needed.', + 'removeOldFilesAndFolders354a' => 'Remove old files and folders that are no longer needed.', 'addAutoIncrementToTables2' => 'Update all new db tables to use auto_increment.', 'updateServerConfigSettings' => 'Update the configuration settings for the server with the correct port' ); @@ -122,7 +122,7 @@ class UpgradeFunctions { var $priority = array( 'addAutoIncrementToTables'=>1, 'addAutoIncrementToTables2'=>-1, - 'removeOldFilesAndFolders354'=>1 + 'removeOldFilesAndFolders354a'=>1 ); function addAutoIncrementToTables2() @@ -1381,6 +1381,15 @@ class UpgradeFunctions { return true; } + // {{{ removeOldFilesAndFolders354a + function removeOldFilesAndFolders354a() { + global $default; + $oldFile = KT_DIR . "/sql/mysql/upgrade/3.5.4/server_name.sql"; + if(file_exists($oldFile)) unlink($oldFile); + + return true; + } + function updateServerConfigSettings() { global $default; $port = $_SERVER['SERVER_PORT']+0; -- libgit2 0.21.4