MSEnum unstringifying parameters

Issue #1107 resolved
Former user created an issue

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)

  1. Former user Account Deleted

    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

  2. Michael Trier

    Well would you open a new ticket to correct the documentation? I can't seem to locate the incorrect docs you're speaking of.

  3. Log in to comment