Mercurial > wow > reaction
diff Profile.lua @ 232:afb5ff4eccc0
db version 2 (State namespace removed)
author | Flick |
---|---|
date | Tue, 22 Mar 2011 11:35:33 -0700 |
parents | ad40cd3fc7e9 |
children | 36a29870bf34 |
line wrap: on
line diff
--- a/Profile.lua Tue Mar 22 11:35:04 2011 -0700 +++ b/Profile.lua Tue Mar 22 11:35:33 2011 -0700 @@ -1,7 +1,7 @@ local _, addonTable = ... local ReAction = addonTable.ReAction -ReAction.PROFILEVERSION_LATEST = 1 +ReAction.PROFILEVERSION_LATEST = 2 ReAction.defaultProfile = { profile = { @@ -117,6 +117,13 @@ vehicle:ResetProfile() end + db.profile.dbversion = 1 + end + + + if db.profile.dbversion < 2 then + -- upgrade from v1 to v2 + -- (10) State module uses the bar config directly local state = db:GetNamespace("State",true) or db:RegisterNamespace("State") if state then @@ -126,10 +133,10 @@ bar.states = sc end end - vehicle:ResetProfile() + state:ResetProfile() end - db.profile.dbversion = 1 + db.profile.dbversion = 2 end db.profile.dbversion = self.PROFILEVERSION_LATEST