MSEnum unstringifying parameters
Issue #1107
resolved
MSEnum is translating incorrectly to SQL, which causes it to crash on a table create with that type.
For example Column('enumerates', MSEnum('a', 'b', 'c') translates to 'enumerates ENUM(a, b, c),'
The quick hack is to surround each string with another string, e.g. Column('enumerates', MSEnum('"a"', '"b"', '"c"'))
Comments (2)
-
Account Deleted -
Well would you open a new ticket to correct the documentation? I can't seem to locate the incorrect docs you're speaking of.
- Log in to comment
The docstring says the 'quick hack' is the correct approach. The documentation on sqlalchemy.org says otherwise. MySQL's ENUM does not allow anything but string literals, so there would be no reason to require that you do "'mystring'". Maybe older versions of MySQL are different in this regard.
I would close this ticket if I could as INVALID.
--nym