diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-10-12 21:59:15 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-10-12 21:59:15 +0100 |
commit | 1faf1773a36c1c70cc77be1633db8c971753460f (patch) | |
tree | 3392a3a52aa7911b1f5f21d1cf060cfd77bab236 | |
parent | 0ac9ea3a74eddc8449f86b15081a48077a00eebf (diff) | |
download | prosody-1faf1773a36c1c70cc77be1633db8c971753460f.tar.gz prosody-1faf1773a36c1c70cc77be1633db8c971753460f.zip |
mod_storage_sql: Keep prosodyarchive_index unique constraint on non-MySQL DBs
-rw-r--r-- | plugins/mod_storage_sql.lua | 2 |
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" }; }; |