Author: phd
Date: 2007-08-21 02:15:28 -0600 (Tue, 21 Aug 2007)
New Revision: 2883
Modified:
SQLObject/trunk/sqlobject/col.py
Log:
Changed the default value for 'varchar' in BLOBColumns from 'auto' to False
(so that the default type for the columns in MySQL is BLOB, not TEXT).
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2007-08-21 08:15:08 UTC (rev 2882)
+++ SQLObject/trunk/sqlobject/col.py 2007-08-21 08:15:28 UTC (rev 2883)
@@ -1396,6 +1396,11 @@
return binary
class SOBLOBCol(SOStringCol):
+ def __init__(self, **kw):
+ # Change the default from 'auto' to False - this is a (mostly) binary column
+ if 'varchar' not in kw: kw['varchar'] = False
+ super(SOBLOBCol, self).__init__(**kw)
+
def createValidators(self):
return [BinaryValidator(name=self.name)] + \
super(SOBLOBCol, self).createValidators()
|