argument 'precision' to both. 'precision' and
'timezone' are correctly reflected for both TIME and
TIMEZONE types. [ticket:997]
+
+- mysql
+ - No longer guessing that TINYINT(1) should be BOOLEAN
+ when reflecting - TINYINT(1) is returned. Use Boolean/
+ BOOLEAN in table definition to get boolean conversion
+ behavior. [ticket:1752]
- oracle
- The Oracle dialect will issue VARCHAR type definitions
name, type_, args, notnull = \
spec['name'], spec['coltype'], spec['arg'], spec['notnull']
- # Convention says that TINYINT(1) columns == BOOLEAN
- if type_ == 'tinyint' and args == '1':
- type_ = 'boolean'
- args = None
- spec['unsigned'] = None
- spec['zerofill'] = None
-
try:
col_type = self.dialect.ischema_names[type_]
except KeyError:
roundtrip([False, False, 0, 0, 0], [False, False, 0, 0, 0])
meta2 = MetaData(testing.db)
- # replace with reflected
table = Table('mysql_bool', meta2, autoload=True)
+ eq_(colspec(table.c.b3), 'b3 TINYINT(1)')
+ eq_(colspec(table.c.b4), 'b4 TINYINT(1) UNSIGNED')
+
+ meta2 = MetaData(testing.db)
+ table = Table('mysql_bool', meta2,
+ Column('b1', BOOLEAN),
+ Column('b2', Boolean),
+ Column('b3', BOOLEAN),
+ Column('b4', BOOLEAN),
+ autoload=True)
eq_(colspec(table.c.b3), 'b3 BOOL')
eq_(colspec(table.c.b4), 'b4 BOOL')