I have some code that worked in 0.8.x but has stopped working in 0.9.x.
The basic reason is that table.kwargs and index.kwargs are now immutable
dicts. On table objects I can address this by doing e.g.:
table.mysql_engine = 'InnoDB'
instead of
table.kwargs['mysql_engine'] = 'InnoDB'
However this:
index.mysql_length = 191
instead of
index.kwargs['mysql_length'] = 191
does not fail, but nor does it make the change.
Setting aside for a moment whether I should be doing these kinds of changes
(explained below), is there a new way to accomplish the change I want that
will work in both 0.8 and 0.9?
The code in question[1] is a subclass (in a separate package) of some other
code that generically supports most of the dialects that sqlalchemy
supports. The subclass is to accommodate mysql's, uh, curiosities across a
variety of versions and table choices by traversing across the
Base.metadata.sorted_tables (established in the superclass) before calling
Base.metadata.create_all.
The code is basically mature (or might even be called legacy) and hasn't
been touched in quite some time and nobody really wants to, but now it is
broken with the future of sqlalchemy so I'd to address this one issue and
move on, if possible.
Any suggestions?
Thanks!
[1] https://github.com/tiddlyweb/tiddlywebplugins.mysql
https://github.com/tiddlyweb/tiddlywebplugins.mysql/blob/81f238e7c1c5c9c9e530fa000a3ad46b14f30ffd/tiddlywebplugins/mysql3/__init__.py#L108-L143
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.