Software / code / prosody
Comparison
plugins/mod_storage_sql.lua @ 8409:e98b4352d7df
mod_storage_sql: Add indices that include the with and when columns of archives
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 21 Nov 2017 14:46:21 +0100 |
| parent | 8293:34814a908557 |
| child | 8410:54ff1f91e4db |
| child | 8478:384658c7a26a |
comparison
equal
deleted
inserted
replaced
| 8405:a3cf899fd61b | 8409:e98b4352d7df |
|---|---|
| 450 Column { name="when", type="INTEGER", nullable=false }; -- timestamp | 450 Column { name="when", type="INTEGER", nullable=false }; -- timestamp |
| 451 Column { name="with", type="TEXT", nullable=false }; -- related id | 451 Column { name="with", type="TEXT", nullable=false }; -- related id |
| 452 Column { name="type", type="TEXT", nullable=false }; | 452 Column { name="type", type="TEXT", nullable=false }; |
| 453 Column { name="value", type="MEDIUMTEXT", nullable=false }; | 453 Column { name="value", type="MEDIUMTEXT", nullable=false }; |
| 454 Index { name="prosodyarchive_index", unique = true, "host", "user", "store", "key" }; | 454 Index { name="prosodyarchive_index", unique = true, "host", "user", "store", "key" }; |
| 455 Index { name="prosodyarchive_with", "host", "user", "store", "with" }; | |
| 456 Index { name="prosodyarchive_when", "host", "user", "store", "when" }; | |
| 455 }; | 457 }; |
| 456 engine:transaction(function() | 458 engine:transaction(function() |
| 457 ProsodyArchiveTable:create(engine); | 459 ProsodyArchiveTable:create(engine); |
| 458 end); | 460 end); |
| 459 end | 461 end |