From 7679825f30333c7ee10aa2c68bde3dd69a21609d Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 12 Oct 2018 21:59:15 +0100 Subject: mod_storage_sql: Keep prosodyarchive_index unique constraint on non-MySQL DBs --- 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 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" }; }; -- cgit v1.2.3