]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Correction to reflection fix r5718 to handle Binary / other numeric types.
authorMichael Trier <mtrier@gmail.com>
Fri, 23 Jan 2009 01:45:20 +0000 (01:45 +0000)
committerMichael Trier <mtrier@gmail.com>
Fri, 23 Jan 2009 01:45:20 +0000 (01:45 +0000)
lib/sqlalchemy/databases/mssql.py

index ae36125130ee156887798edffb3087fea733c85c..90021b1d6548535fa2e2a6c8b29147a61a8b8956 100644 (file)
@@ -1151,14 +1151,14 @@ class MSSQLDialect(default.DefaultDialect):
             coltype = self.ischema_names.get(type, None)
 
             kwargs = {}
-            if coltype in (MSString, MSChar, MSNVarchar, MSNChar, MSText, MSNText):
+            if coltype in (MSString, MSChar, MSNVarchar, MSNChar, MSText, MSNText, MSBinary, MSVarBinary, sqltypes.Binary):
                 kwargs['length'] = charlen
                 if collation:
                     kwargs['collation'] = collation
                 if coltype == MSText or (coltype in (MSString, MSNVarchar) and charlen == -1):
                     kwargs.pop('length')
 
-            if coltype in (MSNumeric,):   # TODO: include MSMoney?
+            if issubclass(coltype, sqltypes.Numeric):
                 kwargs['scale'] = numericscale
                 kwargs['precision'] = numericprec