Software / code / prosody
Comparison
plugins/mod_storage_sql.lua @ 13787:3e72cdca6beb
Merge 13.0->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 23 Mar 2025 17:24:49 +0100 |
| parent | 13784:b30eaa74d35b |
| child | 13832:5973a5d22ab5 |
comparison
equal
deleted
inserted
replaced
| 13783:833fa5d08d13 | 13787:3e72cdca6beb |
|---|---|
| 883 indices[row[1]] = true; | 883 indices[row[1]] = true; |
| 884 end | 884 end |
| 885 end | 885 end |
| 886 end) | 886 end) |
| 887 if indices["prosody_index"] then | 887 if indices["prosody_index"] then |
| 888 if apply_changes then | 888 local success = engine:transaction(function () |
| 889 local success = engine:transaction(function () | 889 return assert(engine:execute([[DROP INDEX "prosody_index";]])); |
| 890 return assert(engine:execute([[DROP INDEX "prosody_index";]])); | 890 end); |
| 891 end); | 891 if not success then |
| 892 if not success then | 892 module:log("error", "Failed to delete obsolete index \"prosody_index\""); |
| 893 module:log("error", "Failed to delete obsolete index \"prosody_index\""); | 893 return false; |
| 894 return false; | |
| 895 end | |
| 896 else | |
| 897 changes = true; | |
| 898 end | 894 end |
| 899 end | 895 end |
| 900 end | 896 end |
| 901 return changes; | 897 return changes; |
| 902 end | 898 end |