mod_storage_sql2: The prosodyarchive_index should be unique
authorKim Alvefur <zash@zash.se>
Wed, 30 Oct 2013 21:37:07 +0000 (22:37 +0100)
committerKim Alvefur <zash@zash.se>
Wed, 30 Oct 2013 21:37:07 +0000 (22:37 +0100)
plugins/mod_storage_sql2.lua

index a4f47a87e873faf92cb84e90865615f0685bb653..9be10d24d2035ca28f550bc09864bbc1c4d07dff 100644 (file)
@@ -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);