From 7340c4e1f264712771933cb8455511fc09cda442 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 11 Apr 2025 09:45:04 +0200 Subject: mod_storage_sql: Retrieve all indices to see if the new one exists Otherwise it warns about it being missing, even if it exists. --- plugins/mod_storage_sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index e7b06f31..6d9af68a 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -883,7 +883,7 @@ local function upgrade_table(engine, params, apply_changes) -- luacheck: ignore indices[row[1]] = true; end elseif params.driver == "PostgreSQL" then - for row in engine:select [[SELECT "indexname" FROM "pg_indexes" WHERE "tablename"='prosody' AND "indexname"='prosody_index';]] do + for row in engine:select [[SELECT "indexname" FROM "pg_indexes" WHERE "tablename"='prosody';]] do indices[row[1]] = true; end end -- cgit v1.2.3