diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_storage_sql.lua | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index 5f80fad7..f053f729 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -885,16 +885,12 @@ local function upgrade_table(engine, params, apply_changes) -- luacheck: ignore end end) if indices["prosody_index"] then - if apply_changes then - local success = engine:transaction(function () - return assert(engine:execute([[DROP INDEX "prosody_index";]])); - end); - if not success then - module:log("error", "Failed to delete obsolete index \"prosody_index\""); - return false; - end - else - changes = true; + local success = engine:transaction(function () + return assert(engine:execute([[DROP INDEX "prosody_index";]])); + end); + if not success then + module:log("error", "Failed to delete obsolete index \"prosody_index\""); + return false; end end end |