# HG changeset patch # User Kim Alvefur # Date 1383139995 -3600 # Node ID b6a56934338c5fc567e626396b86890fe72eca60 # Parent 544ca3d945969c7f21e73137306ccaa72390977c mod_storage_sql2: Use MEDIUMTEXT fields for value columns (ie TEXT on non-MySQL) diff -r 544ca3d94596 -r b6a56934338c plugins/mod_storage_sql2.lua --- 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()