# HG changeset patch # User Matthew Wild # Date 1539377955 -3600 # Node ID 7de89d66cbb98f1b0ff27f9c6e055fc618650a34 # Parent 36e379f058c889ae8795ce8047677a7dd1fc6729 mod_storage_sql: Keep prosodyarchive_index unique constraint on non-MySQL DBs diff -r 36e379f058c8 -r 7de89d66cbb9 plugins/mod_storage_sql.lua --- a/plugins/mod_storage_sql.lua Fri Oct 12 17:36:34 2018 +0200 +++ b/plugins/mod_storage_sql.lua Fri Oct 12 21:59:15 2018 +0100 @@ -496,7 +496,7 @@ 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" }; };