aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-10-12 21:59:15 +0100
committerMatthew Wild <mwild1@gmail.com>2018-10-12 21:59:15 +0100
commit9ae8e96685655f33b74e05d3fd4571bc063a8a06 (patch)
tree3392a3a52aa7911b1f5f21d1cf060cfd77bab236 /plugins
parent75784460bb29c7f157e795b87a199cc9134bf90d (diff)
downloadprosody-9ae8e96685655f33b74e05d3fd4571bc063a8a06.tar.gz
prosody-9ae8e96685655f33b74e05d3fd4571bc063a8a06.zip
mod_storage_sql: Keep prosodyarchive_index unique constraint on non-MySQL DBs
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_sql.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index 872b5f49..859b43c9 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -496,7 +496,7 @@ local function create_table(engine) -- luacheck: ignore 431/engine
Column { name="with", type="TEXT", nullable=false }; -- related id
Column { name="type", type="TEXT", nullable=false };
Column { name="value", type="MEDIUMTEXT", nullable=false };
- Index { name="prosodyarchive_index", "host", "user", "store", "key" };
+ Index { name="prosodyarchive_index", unique = engine.params.driver ~= "MySQL", "host", "user", "store", "key" };
Index { name="prosodyarchive_with_when", "host", "user", "store", "with", "when" };
Index { name="prosodyarchive_when", "host", "user", "store", "when" };
};