diff options
author | ndparker <ndparker@users.noreply.github.com> | 2014-09-24 00:13:40 +0200 |
---|---|---|
committer | ndparker <ndparker@users.noreply.github.com> | 2014-10-05 00:54:09 +0200 |
commit | 00018f0748a2eac323248c5d80c28a127907344a (patch) | |
tree | 1b0ce2f321f7951b1992224526fe08f7b60e18b2 /lib/sqlalchemy/dialects/mysql/base.py | |
parent | 360477cc3af826b5056039b9a19ec3ecb2b94ede (diff) | |
download | sqlalchemy-pr/141.tar.gz |
specialize schema reflection warningspr/141
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 7ccd59abb..365155fe1 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -2904,10 +2904,14 @@ class MySQLTableDefinitionParser(object): spec = m.groupdict() spec['full'] = False if not spec: - util.warn("Unknown column definition %r" % line) + util.warn(exc.SAUnparsableTypeReflectionWarning( + "Unknown column definition %r" % line + )) return if not spec['full']: - util.warn("Incomplete reflection of column definition %r" % line) + util.warn(exc.SAIncompleteTypeReflectionWarning( + "Incomplete reflection of column definition %r" % line + )) name, type_, args, notnull = \ spec['name'], spec['coltype'], spec['arg'], spec['notnull'] @@ -2915,8 +2919,10 @@ class MySQLTableDefinitionParser(object): try: col_type = self.dialect.ischema_names[type_] except KeyError: - util.warn("Did not recognize type '%s' of column '%s'" % - (type_, name)) + util.warn(exc.SAUnknownTypeReflectionWarning( + "Did not recognize type '%s' of column '%s'" % + (type_, name) + )) col_type = sqltypes.NullType # Column type positional arguments eg. varchar(32) |