Software /
code /
prosody
Changeset
9500:7de89d66cbb9
mod_storage_sql: Keep prosodyarchive_index unique constraint on non-MySQL DBs
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 12 Oct 2018 21:59:15 +0100 |
parents | 9499:36e379f058c8 |
children | 9501:8715961bfa13 |
files | plugins/mod_storage_sql.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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" }; };