mod_storage_sql2: The prosodyarchive_index should be unique
authorKim Alvefur <zash@zash.se>
Wed, 30 Oct 2013 22:37:07 +0100
changeset 5893 62ce0328fdfe
parent 5892 319ccceb1302
child 5894 9e47ece9457c
mod_storage_sql2: The prosodyarchive_index should be unique
plugins/mod_storage_sql2.lua
--- a/plugins/mod_storage_sql2.lua	Wed Oct 30 22:27:22 2013 +0100
+++ b/plugins/mod_storage_sql2.lua	Wed Oct 30 22:37:07 2013 +0100
@@ -73,7 +73,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 = true, "host", "user", "store", "key" };
 	};
 	engine:transaction(function()
 		ProsodyArchiveTable:create(engine);