diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-04-01 19:55:15 +0200 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-04-01 19:58:23 +0200 |
commit | 1e3a0e0ca0c58ae740424fa6cf239f2dba5dc592 (patch) | |
tree | 124184737dfe2ce53866776893625b58371fba6e | |
parent | 98853c63fde6e133dca6c723aaacfb1f368cad38 (diff) | |
download | mediagoblin-1e3a0e0ca0c58ae740424fa6cf239f2dba5dc592.tar.lz mediagoblin-1e3a0e0ca0c58ae740424fa6cf239f2dba5dc592.tar.xz mediagoblin-1e3a0e0ca0c58ae740424fa6cf239f2dba5dc592.zip |
Switch JSONEncoded from VARCHAR to TEXT
The JSON fields are really "dumb stuff in here" fields.
They are not intended to get indexed or anything. And they
can get large. For example the exif_all field in one of my
simple tests is nearly 7 kB large. Although VARCHAR might
work, TEXT feels just better as the storage type.
-rw-r--r-- | mediagoblin/db/sql/extratypes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/db/sql/extratypes.py b/mediagoblin/db/sql/extratypes.py index 8e078f14..f2304af0 100644 --- a/mediagoblin/db/sql/extratypes.py +++ b/mediagoblin/db/sql/extratypes.py @@ -15,7 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. -from sqlalchemy.types import TypeDecorator, Unicode, VARCHAR +from sqlalchemy.types import TypeDecorator, Unicode, TEXT import json @@ -50,7 +50,7 @@ class PathTupleWithSlashes(TypeDecorator): class JSONEncoded(TypeDecorator): "Represents an immutable structure as a json-encoded string." - impl = VARCHAR + impl = TEXT def process_bind_param(self, value, dialect): if value is not None: |