Mysql reflection fails with unsigned keyword
Issue #272
resolved
When trying to reflect a table with a column with the unsigned keyword this exception is thrown:
Using SQLAlchemy 0.2.6 installed via easy_install and mysql 4.
$ python bug.py
Traceback (most recent call last):
File "bug.py", line 5, in ?
bug_table = Table("bug", meta, autoload=True)
File "build/bdist.darwin-8.7.1-i386/egg/sqlalchemy/schema.py", line 97, in __call__
File "build/bdist.darwin-8.7.1-i386/egg/sqlalchemy/engine/base.py", line 488, in reflecttable
File "build/bdist.darwin-8.7.1-i386/egg/sqlalchemy/databases/mysql.py", line 337, in reflecttable
TypeError: __init__() got an unexpected keyword argument 'unsigned'
The SQL used to create this:
CREATE TABLE `bug` (
`bug_id` mediumint(8) unsigned NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
And my bug.py:
from sqlalchemy import *
meta = meta = BoundMetaData("mysql://localhost/bug")
bug_table = Table("bug", meta, autoload=True)
(I was trying to reflect a phpBB table in case you were curious)
Comments (2)
-
Account Deleted -
repo owner - changed status to duplicate
yah, dupe of
#264(however creating a table with the unsigned flag is still broken, thats coming up in the next changeset)
- Log in to comment
I just tested this on the latest svn version (1788) and I'm not seeing this problem.