Heya,
I've got an addon which uses SavedVariables. Now I want to add a new variable to the SavedVars and have the users keep their old settings.
Example old variables
Code:
defaults = {
useDummy = false,
startValue = 500
}
db = ZO_SavedVars:NewAccountWide("MyAddon_SavedVars", 1, nil, defaults)
Example new variables
Code:
defaults = {
useDummy = false,
startValue = 500,
beAwesome = true
}
db = ZO_SavedVars:NewAccountWide("MyAddon_SavedVars", 1, nil, defaults)
And then I use the db variable with LibAddonMenu-2.0
When I give the new version to a user with old SavedVars they get an error. When I reinstall it, it works.
So for existing users the db variable does not include the new beAwesome value.
I have read about SavedVariables versioning here here
https://www.esoui.com/forums/showthr...avedVars%3ANew
But then you would overwrite all existing SavedVars which is not what I want.
Is there a way to add a new variable and keep the old user settings?