Quantcast

Default for db version now most recent

Peter Eliasson [08-05-16 - 18:06]
Default for db version now most recent

If doing a clean install, one will get the latest db structure, meaning
the version of the database should be the most recent.
Filename
src/main.lua
diff --git a/src/main.lua b/src/main.lua
index 6900213..e7e5dd4 100644
--- a/src/main.lua
+++ b/src/main.lua
@@ -29,19 +29,19 @@ addon.versionName = '0.0.0-debug';
 local modPrototype = { Debug = function(self, ...) addon:Debug(...) end }
 addon:SetDefaultModulePrototype(modPrototype)

+-- The current db version. Migrate the database if
+-- version of database doesn't match this version.
+addon.dbVersion = 11;
+
 -- Db default settings
 addon.dbDefaults = {
 	realm = {
 		modules = {},
 		options = {},
-		dbVersion = 1
+		dbVersion = addon.dbVersion
 	},
 }

--- The current db version. Migrate the database if
--- version of database doesn't match this version.
-addon.dbVersion = 11;
-
 -- Constants
 DEBUG_PRINT = false;
 --@debug@