Software /
code /
prosody
Comparison
plugins/mod_storage_sql.lua @ 10655:ee6c12264420 0.11
mod_storage_sql: Move update limit check back one step, fixes traceback
0c00274528a4 moved it one step too far, so the check was performed
before connecting to the database instead of after.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Feb 2020 16:23:43 +0100 |
parent | 10652:0c00274528a4 |
child | 10656:ffa9a20aca8b |
child | 10700:3fce670e0733 |
comparison
equal
deleted
inserted
replaced
10652:0c00274528a4 | 10655:ee6c12264420 |
---|---|
621 if upgrade_table(engine, params, false) then | 621 if upgrade_table(engine, params, false) then |
622 module:log("error", "Old database format detected. Please run: prosodyctl mod_%s upgrade", module.name); | 622 module:log("error", "Old database format detected. Please run: prosodyctl mod_%s upgrade", module.name); |
623 return false, "database upgrade needed"; | 623 return false, "database upgrade needed"; |
624 end | 624 end |
625 end | 625 end |
626 if engine.params.driver == "SQLite3" then | |
627 for row in engine:select("PRAGMA compile_options") do | |
628 if row[1] == "ENABLE_UPDATE_DELETE_LIMIT" then | |
629 engine._have_delete_limit = true; | |
630 end | |
631 end | |
632 end | |
626 end); | 633 end); |
627 if engine.params.driver == "SQLite3" then | |
628 for row in engine:select("PRAGMA compile_options") do | |
629 if row[1] == "ENABLE_UPDATE_DELETE_LIMIT" then | |
630 engine._have_delete_limit = true; | |
631 end | |
632 end | |
633 end | |
634 engines[sql.db2uri(params)] = engine; | 634 engines[sql.db2uri(params)] = engine; |
635 end | 635 end |
636 | 636 |
637 module:provides("storage", driver); | 637 module:provides("storage", driver); |
638 end | 638 end |