Comparison

plugins/mod_storage_sql.lua @ 10653:94f6fb21a764

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Fri, 21 Feb 2020 23:01:43 +0100
parent 10564:3098eac31139
parent 10652:0c00274528a4
child 10656:ffa9a20aca8b
comparison
equal deleted inserted replaced
10651:1196f1e8d178 10653:94f6fb21a764
725 -- Check whether the table needs upgrading 725 -- Check whether the table needs upgrading
726 if upgrade_table(engine, params, false) then 726 if upgrade_table(engine, params, false) then
727 module:log("error", "Old database format detected. Please run: prosodyctl mod_%s upgrade", module.name); 727 module:log("error", "Old database format detected. Please run: prosodyctl mod_%s upgrade", module.name);
728 return false, "database upgrade needed"; 728 return false, "database upgrade needed";
729 end 729 end
730 if engine.params.driver == "SQLite3" then
731 for row in engine:select("PRAGMA compile_options") do
732 if row[1] == "ENABLE_UPDATE_DELETE_LIMIT" then
733 engine._have_delete_limit = true;
734 end
735 end
736 end
737 end 730 end
738 end); 731 end);
732 if engine.params.driver == "SQLite3" then
733 for row in engine:select("PRAGMA compile_options") do
734 if row[1] == "ENABLE_UPDATE_DELETE_LIMIT" then
735 engine._have_delete_limit = true;
736 end
737 end
738 end
739 engines[sql.db2uri(params)] = engine; 739 engines[sql.db2uri(params)] = engine;
740 end 740 end
741 741
742 module:provides("storage", driver); 742 module:provides("storage", driver);
743 end 743 end