Software /
code /
prosody
Comparison
plugins/mod_storage_sql.lua @ 13159:706f7d1affc2
mod_storage_sql: Fix column name in index check for PostgreSQL
Forgot to change the column name in 9a7523ea45cb
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 17 Jun 2023 13:37:33 +0200 |
parent | 13158:cf2a907ac130 |
child | 13190:9dc6de46dae3 |
comparison
equal
deleted
inserted
replaced
13158:cf2a907ac130 | 13159:706f7d1affc2 |
---|---|
852 if params.driver == "SQLite3" then | 852 if params.driver == "SQLite3" then |
853 for row in engine:select [[SELECT "name" FROM "sqlite_schema" WHERE "type"='index' AND "tbl_name"='prosody' AND "name"='prosody_index';]] do | 853 for row in engine:select [[SELECT "name" FROM "sqlite_schema" WHERE "type"='index' AND "tbl_name"='prosody' AND "name"='prosody_index';]] do |
854 indices[row[1]] = true; | 854 indices[row[1]] = true; |
855 end | 855 end |
856 elseif params.driver == "PostgreSQL" then | 856 elseif params.driver == "PostgreSQL" then |
857 for row in engine:select [[SELECT "relname" FROM "pg_indexes" WHERE "tablename"='prosody' AND "indexname"='prosody_index';]] do | 857 for row in engine:select [[SELECT "indexname" FROM "pg_indexes" WHERE "tablename"='prosody' AND "indexname"='prosody_index';]] do |
858 indices[row[1]] = true; | 858 indices[row[1]] = true; |
859 end | 859 end |
860 end | 860 end |
861 end) | 861 end) |
862 if indices["prosody_index"] then | 862 if indices["prosody_index"] then |