Software /
code /
prosody
Changeset
5891:b6a56934338c
mod_storage_sql2: Use MEDIUMTEXT fields for value columns (ie TEXT on non-MySQL)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 30 Oct 2013 14:33:15 +0100 |
parents | 5890:544ca3d94596 |
children | 5892:319ccceb1302 |
files | plugins/mod_storage_sql2.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_storage_sql2.lua Wed Oct 30 10:24:35 2013 +0100 +++ b/plugins/mod_storage_sql2.lua Wed Oct 30 14:33:15 2013 +0100 @@ -35,7 +35,7 @@ Column { name="store", type="TEXT", nullable=false }; Column { name="key", type="TEXT", nullable=false }; Column { name="type", type="TEXT", nullable=false }; - Column { name="value", type="TEXT", nullable=false }; + Column { name="value", type="MEDIUMTEXT", nullable=false }; Index { name="prosody_index", "host", "user", "store", "key" }; }; engine:transaction(function() @@ -72,7 +72,7 @@ Column { name="when", type="INTEGER", nullable=false }; -- timestamp Column { name="with", type="TEXT", nullable=false }; -- related id Column { name="type", type="TEXT", nullable=false }; - Column { name="value", type=params.driver == "MySQL" and "MEDIUMTEXT" or "TEXT", nullable=false }; + Column { name="value", type="MEDIUMTEXT", nullable=false }; Index { name="prosodyarchive_index", "host", "user", "store", "key" }; }; engine:transaction(function()