Mercurial > wow > reaction
changeset 232:afb5ff4eccc0
db version 2 (State namespace removed)
author | Flick |
---|---|
date | Tue, 22 Mar 2011 11:35:33 -0700 |
parents | 158c9299185b |
children | 9b9f5fc84d34 |
files | Profile.lua |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
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