wipe and reload db if in debug mode

master
flux 2019-08-08 02:43:13 +00:00
parent d3c6d85f00
commit f06556deb6
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ local function init_db()
error('[Verbana] database version is more recent than code version; please upgrade code.')
elseif current_version == data.version then
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
if not clean_db() then
error('[Verbana] error wiping existing DB')