diff options
author | Kim Alvefur <zash@zash.se> | 2013-10-30 14:33:15 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2013-10-30 14:33:15 +0100 |
commit | 1ffe00783ee9b52984d362564ca71ce9301f37c5 (patch) | |
tree | 3b816bf256b011d679683a3f27689d3ff508e39a | |
parent | f04a2061aaffe9e56905f1daa40970d58c29cebf (diff) | |
download | prosody-1ffe00783ee9b52984d362564ca71ce9301f37c5.tar.gz prosody-1ffe00783ee9b52984d362564ca71ce9301f37c5.zip |
mod_storage_sql2: Use MEDIUMTEXT fields for value columns (ie TEXT on non-MySQL)
-rw-r--r-- | plugins/mod_storage_sql2.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_storage_sql2.lua b/plugins/mod_storage_sql2.lua index 4148024e..dcd7a45a 100644 --- a/plugins/mod_storage_sql2.lua +++ b/plugins/mod_storage_sql2.lua @@ -35,7 +35,7 @@ local function create_table() 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 @@ local function create_table() 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() |