From ba16a27ab0faa553f4dc57499456f274f3538188 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 27 Aug 2008 18:51:40 +0000 Subject: remove pre-Migration upgrade paths --- OpenSim/Data/MySQL/MySQLInventoryData.cs | 92 -------------------------------- 1 file changed, 92 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 4e8200b..fe2d393 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -90,101 +90,9 @@ namespace OpenSim.Data.MySQL // This actually does the roll forward assembly stuff Assembly assem = GetType().Assembly; Migration m = new Migration(database.Connection, assem, "InventoryStore"); - - // TODO: After rev 6000, remove this. People should have - // been rolled onto the new migration code by then. - TestTables(database.Connection, m); - m.Update(); } - #region Test and initialization code - - /// - /// - /// Execute CreateFoldersTable.sql if oldVersion == null - /// do nothing if oldVersion != null - /// - /// - /// - private void UpgradeFoldersTable(string oldVersion) - { - // null as the version, indicates that the table didn't exist - if (oldVersion == null) - { - database.ExecuteResourceSql("CreateFoldersTable.sql"); - return; - } - - //// if the table is already at the current version, then we can exit immediately - // if (oldVersion == "Rev. 2") - // return; - // database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql"); - } - - /// - /// - /// Execute CreateItemsTable.sql if oldVersion == null - /// Execute "UpgradeItemsTableToVersion3.sql" if oldVersion start with "Rev. 2;" - /// - /// - /// - private void UpgradeItemsTable(string oldVersion) - { - // null as the version, indicates that the table didn't exist - if (oldVersion == null) - { - database.ExecuteResourceSql("CreateItemsTable.sql"); - return; - } - - // if the table is already at the current version, then we can exit immediately - if (oldVersion.StartsWith("Rev. 2;")) - { - m_log.Info("[INVENTORY DB]: Upgrading inventory items table from Rev. 2 to Rev. 3"); - database.ExecuteResourceSql("UpgradeItemsTableToVersion3.sql"); - } - } - - /// - /// - /// - /// MySQL connection handler - /// - private void TestTables(MySqlConnection conn, Migration m) - { - Dictionary tableList = new Dictionary(); - - tableList["inventoryfolders"] = null; - tableList["inventoryitems"] = null; - - database.GetTableVersion(tableList); - - // if we've already started using migrations, get out of - // here, we've got this under control - if (m.Version > 0) - return; - - // if there are no tables, get out of here and let - // migrations do their job - if ( - tableList["inventoryfolders"] == null && - tableList["inventoryitems"] == null - ) - return; - - // otherwise, let the upgrade on legacy proceed... - UpgradeFoldersTable(tableList["inventoryfolders"]); - UpgradeItemsTable(tableList["inventoryitems"]); - - // ... and set the version - if (m.Version == 0) - m.Version = 1; - - } - - #endregion - /// /// The name of this DB provider /// -- cgit v1.1