From b3f9455c97ef20a674c774daa2490028ee168801 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 30 Oct 2013 22:37:07 +0100 Subject: mod_storage_sql2: The prosodyarchive_index should be unique --- plugins/mod_storage_sql2.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_storage_sql2.lua') diff --git a/plugins/mod_storage_sql2.lua b/plugins/mod_storage_sql2.lua index a4f47a87..9be10d24 100644 --- a/plugins/mod_storage_sql2.lua +++ b/plugins/mod_storage_sql2.lua @@ -73,7 +73,7 @@ local function create_table() 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 = true, "host", "user", "store", "key" }; }; engine:transaction(function() ProsodyArchiveTable:create(engine); -- cgit v1.2.3