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.
# 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
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: