diff Core.lua @ 217:ca05b8ade1ea

Removed old database patcher. Don?t think anybody needs it anymore and it just acts confusing.
author Zerotorescue
date Sun, 06 Feb 2011 19:26:59 +0100
parents fbd52851dcd1
children c04257b42b03
line wrap: on
line diff
--- a/Core.lua	Sun Feb 06 14:00:41 2011 +0100
+++ b/Core.lua	Sun Feb 06 19:26:59 2011 +0100
@@ -153,60 +153,8 @@
 	if not self.db.global.version or self.db.global.version < addonRevision then
 		-- Is our database outdated? Then patch it.
 		
-		if not self.db.global.version then
-			-- Old version was before version was saved, many changes were done in that revision
-			
-			addon:Print("Updating Inventorium database from version " .. (self.db.global.version or "Unknown") .. " to version " .. addonRevision .. "...");
-			
-			if self.db.global and self.db.global.defaults then
-				addon:Print("Moving all global data into your current profile...");
-				
-				-- All data mustn't be global but profile-based
-				self.db.profile.defaults = CopyTable(self.db.global.defaults);
-				self.db.profile.groups = CopyTable(self.db.global.groups);
-				
-				self.db.global.defaults = nil;
-				self.db.global.groups = nil;
-				
-				self.CommandHandler = function()
-					message("You must /reload once to finalize the Inventorium database updates. This will only be required once during the BETA.");
-				end;
-				self:CommandHandler();
-			end
-			
-			if self.db.profile.defaults.minimumStock then
-				addon:Print("Copying the minimum stock value into the minimum global stock...");
-				
-				-- We added another stock option and renamed the old to be more obvious about what it means
-				self.db.profile.defaults.minGlobalStock = self.db.profile.defaults.minimumStock;
-				self.db.profile.defaults.minimumStock = nil;
-			end
-			
-			if self.db.profile.defaults.minimumLocalStock then
-				addon:Print("Renaming the minimum local stock property...");
-				
-				-- We added another stock option and then renamed it
-				self.db.profile.defaults.minLocalStock = self.db.profile.defaults.minimumLocalStock;
-				self.db.profile.defaults.minimumLocalStock = nil;
-			end
-			
-			if self.db.profile.defaults.alertBelowMinimum then
-				addon:Print("Copying the alert below minimum value into the alert below global minimum value...");
-				
-				-- We added another stock option and then renamed it
-				self.db.profile.defaults.alertBelowGlobalMinimum = self.db.profile.defaults.alertBelowMinimum;
-				self.db.profile.defaults.alertBelowMinimum = nil;
-			end
-			
-			-- Go through all groups to see if there's one with the above two renamed variables
-			for groupName, values in pairs(self.db.profile.groups) do
-				if values.minimumStock then
-					values.minGlobalStock = values.minimumStock;
-					values.minimumStock = nil;
-				end
-			end
-			-- end of old version which didn't have version numbers recorded
-		end
+		--[[if self.db.global.version < 1337 then
+		end]]
 		
 		-- Remember the version of our database
 		self.db.global.version = addonRevision;