Software / code / prosody
Comparison
plugins/mod_storage_sql2.lua @ 5892:319ccceb1302
mod_storage_sql2: Use primary_key and auto_increment flags instead of baking that into the type
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 30 Oct 2013 22:27:22 +0100 |
| parent | 5891:b6a56934338c |
| child | 5893:62ce0328fdfe |
comparison
equal
deleted
inserted
replaced
| 5891:b6a56934338c | 5892:319ccceb1302 |
|---|---|
| 62 engine:execute(index_sql); | 62 engine:execute(index_sql); |
| 63 end); | 63 end); |
| 64 | 64 |
| 65 local ProsodyArchiveTable = Table { | 65 local ProsodyArchiveTable = Table { |
| 66 name="prosodyarchive"; | 66 name="prosodyarchive"; |
| 67 Column { name="sort_id", type="INTEGER PRIMARY KEY AUTOINCREMENT", nullable=false }; | 67 Column { name="sort_id", type="INTEGER", primary_key=true, auto_increment=true, nullable=false }; |
| 68 Column { name="host", type="TEXT", nullable=false }; | 68 Column { name="host", type="TEXT", nullable=false }; |
| 69 Column { name="user", type="TEXT", nullable=false }; | 69 Column { name="user", type="TEXT", nullable=false }; |
| 70 Column { name="store", type="TEXT", nullable=false }; | 70 Column { name="store", type="TEXT", nullable=false }; |
| 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 |