Changeset

5893:62ce0328fdfe

mod_storage_sql2: The prosodyarchive_index should be unique
author Kim Alvefur <zash@zash.se>
date Wed, 30 Oct 2013 22:37:07 +0100
parents 5892:319ccceb1302
children 5894:9e47ece9457c
files plugins/mod_storage_sql2.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);