Software /
code /
prosody
Comparison
plugins/mod_storage_sql2.lua @ 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 |
parent | 5892:319ccceb1302 |
child | 5894:9e47ece9457c |
comparison
equal
deleted
inserted
replaced
5892:319ccceb1302 | 5893:62ce0328fdfe |
---|---|
71 Column { name="key", type="TEXT", nullable=false }; -- item id | 71 Column { name="key", type="TEXT", nullable=false }; -- item id |
72 Column { name="when", type="INTEGER", nullable=false }; -- timestamp | 72 Column { name="when", type="INTEGER", nullable=false }; -- timestamp |
73 Column { name="with", type="TEXT", nullable=false }; -- related id | 73 Column { name="with", type="TEXT", nullable=false }; -- related id |
74 Column { name="type", type="TEXT", nullable=false }; | 74 Column { name="type", type="TEXT", nullable=false }; |
75 Column { name="value", type="MEDIUMTEXT", nullable=false }; | 75 Column { name="value", type="MEDIUMTEXT", nullable=false }; |
76 Index { name="prosodyarchive_index", "host", "user", "store", "key" }; | 76 Index { name="prosodyarchive_index", unique = true, "host", "user", "store", "key" }; |
77 }; | 77 }; |
78 engine:transaction(function() | 78 engine:transaction(function() |
79 ProsodyArchiveTable:create(engine); | 79 ProsodyArchiveTable:create(engine); |
80 end); | 80 end); |
81 end | 81 end |