diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-10-18 17:56:18 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-10-18 17:56:18 +0000 |
commit | f32131dac212fdee1a6e97eba4a4ed21e51b3607 (patch) | |
tree | 8d9417d9e609779f8172e2ac2f5759bef5b9db81 /lib/sqlalchemy | |
parent | ed2d7dc80545d2ed1dd79a393efff8e20024126f (diff) | |
download | sqlalchemy-f32131dac212fdee1a6e97eba4a4ed21e51b3607.tar.gz |
- added test coverage for unknown type reflection, fixed
sqlite/mysql handling of type reflection for unknown types
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/databases/mysql.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/sqlite.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index 66b62c215..de417f3a5 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -2046,7 +2046,7 @@ class MySQLSchemaReflector(object): warnings.warn(RuntimeWarning( "Did not recognize type '%s' of column '%s'" % (type_, name))) - col_type = sqltypes.NULLTYPE + col_type = sqltypes.NullType # Column type positional arguments eg. varchar(32) if args is None or args == '': diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index ea15381db..99a1d5650 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -153,7 +153,7 @@ colspecs = { sqltypes.CHAR: SLChar, } -pragma_names = { +ischema_names = { 'INTEGER' : SLInteger, 'INT' : SLInteger, 'SMALLINT' : SLSmallInteger, @@ -271,10 +271,10 @@ class SQLiteDialect(default.DefaultDialect): args = '' try: - coltype = pragma_names[coltype] + coltype = ischema_names[coltype] except KeyError: warnings.warn(RuntimeWarning("Did not recognize type '%s' of column '%s'" % (coltype, name))) - coltype = sqltypes.NULLTYPE + coltype = sqltypes.NullType if args is not None: args = re.findall(r'(\d+)', args) |