# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1582322503 -3600
# Node ID 94f6fb21a764a8dc14a97139fe8839af5a42e77b
# Parent  1196f1e8d178c83503da54f363a44f56e9752833# Parent  0c00274528a43c169c80535a80f42370e82eff06
Merge 0.11->trunk

diff -r 1196f1e8d178 -r 94f6fb21a764 plugins/mod_storage_sql.lua
--- a/plugins/mod_storage_sql.lua	Wed Feb 19 21:38:00 2020 +0100
+++ b/plugins/mod_storage_sql.lua	Fri Feb 21 23:01:43 2020 +0100
@@ -727,15 +727,15 @@
 					module:log("error", "Old database format detected. Please run: prosodyctl mod_%s upgrade", module.name);
 					return false, "database upgrade needed";
 				end
-				if engine.params.driver == "SQLite3" then
-					for row in engine:select("PRAGMA compile_options") do
-						if row[1] == "ENABLE_UPDATE_DELETE_LIMIT" then
-							engine._have_delete_limit = true;
-						end
-					end
+			end
+		end);
+		if engine.params.driver == "SQLite3" then
+			for row in engine:select("PRAGMA compile_options") do
+				if row[1] == "ENABLE_UPDATE_DELETE_LIMIT" then
+					engine._have_delete_limit = true;
 				end
 			end
-		end);
+		end
 		engines[sql.db2uri(params)] = engine;
 	end