aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-10-30 22:37:07 +0100
committerKim Alvefur <zash@zash.se>2013-10-30 22:37:07 +0100
commitb3f9455c97ef20a674c774daa2490028ee168801 (patch)
tree53c852818b5ddd751396b1f4c3e5474a6f5433d9
parentabb45cc639f5974aaf5c4fd61618886aa492425b (diff)
downloadprosody-b3f9455c97ef20a674c774daa2490028ee168801.tar.gz
prosody-b3f9455c97ef20a674c774daa2490028ee168801.zip
mod_storage_sql2: The prosodyarchive_index should be unique
-rw-r--r--plugins/mod_storage_sql2.lua2
1 files changed, 1 insertions, 1 deletions
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);