Your .toc file requires a
## SavedVariables: entry that matches the name of your
LibStub("AceDB-3.0"):New(...) setting
eg:
Code:
## SavedVariables: RandomHearthToyDB
This tells the game to write the variable(s) to disk when the player logs off/reloads.
There is also
## SavedVariablesPerCharacter: to save the information seperately for each character.
Many addons will create a single "global" variable set (
## SavedVariables) and manage individual character information within that using profiles (sets of information that can be assigned to one or more characters)
More information
Here