aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-10-30 14:33:15 +0100
committerKim Alvefur <zash@zash.se>2013-10-30 14:33:15 +0100
commit029256f34a7f430d379007f783d9f6c1a86da1f8 (patch)
tree3b816bf256b011d679683a3f27689d3ff508e39a
parent1bcfdab54f7785d3db05c65ad5672406885d0b91 (diff)
downloadprosody-029256f34a7f430d379007f783d9f6c1a86da1f8.tar.gz
prosody-029256f34a7f430d379007f783d9f6c1a86da1f8.zip
mod_storage_sql2: Use MEDIUMTEXT fields for value columns (ie TEXT on non-MySQL)
-rw-r--r--plugins/mod_storage_sql2.lua4
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()