# HG changeset patch # User Zerotorescue # Date 1297016819 -3600 # Node ID ca05b8ade1ea318f7939af48efde5dc6c3115a99 # Parent 70daa765e2754b4c91275231f3885bc780e1ddce Removed old database patcher. Don?t think anybody needs it anymore and it just acts confusing. diff -r 70daa765e275 -r ca05b8ade1ea Core.lua --- 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;