wipe and reload db if in debug mode
parent
d3c6d85f00
commit
f06556deb6
2
data.lua
2
data.lua
|
@ -280,7 +280,7 @@ local function init_db()
|
||||||
error('[Verbana] database version is more recent than code version; please upgrade code.')
|
error('[Verbana] database version is more recent than code version; please upgrade code.')
|
||||||
elseif current_version == data.version then
|
elseif current_version == data.version then
|
||||||
return -- everything is up to date
|
return -- everything is up to date
|
||||||
elseif current_version == 0 then
|
elseif current_version == 0 or verbana.settings.debug_mode then
|
||||||
-- wipe any pre-existing copies of the schema
|
-- wipe any pre-existing copies of the schema
|
||||||
if not clean_db() then
|
if not clean_db() then
|
||||||
error('[Verbana] error wiping existing DB')
|
error('[Verbana] error wiping existing DB')
|
||||||
|
|
Loading…
Reference in New Issue