On Sep 23, 8:25 am, Gaetan de Menten <[email protected]> wrote:
> On Wed, Sep 23, 2009 at 06:37, andrewwatts <[email protected]> wrote:
> > Hello, I'm new to Elixir and SQLAlchemy and using them with MySQL.
> > And, I would like to use an InnoDB engine for all tables, but,
> > *without* modifying the default MySQL engine type.
>
> > I know this is possible with using_table_options
> > (mysql_engine="InnoDB") on most tables, however I am struggling to
> > find a way for tables created from ManyToMany relationships.
> > According to the Elixir Documentation[1]: "Behind the scene, the
> > ManyToMany relationship will automatically create an intermediate
> > table to host its data."
>
> > Is there a way to define the table options and an InnoDB engine for
> > the intermediate table automatically created by a ManyToMany
> > relationship? If not, any recommendations other than an "alter table"
> > command in mysql?
>
> Ouch. This is the kind of problem Elixir is meant to solve and here it
> just gets in the way. There is currently no way to do that. Adding an
> argument like "table_kwargs" to ManyToMany would be dead easy and
> would at least allow you to do what you want (albeit in an not very
> elegant way), patch welcome.
>
> The already nicer (IMO) way to fix this is to do it for all your
> tables at once by modifying options_defaults as follow:
>
> elixir.options_defaults['table_options'] = dict(mysql_engine="InnoDB")
>
> Unfortunately that would also needs a small patch to work for the
> tables created by the ManyToMany relationships (so that they also use
> the default table options). Patch welcome too ;-).
>
> These two patches are really entry-level patches, so if anybody always
> wanted to hack on Elixir but didn't know of an easy task to tackle,
> here is your chance !
>
I saw you included updates for this in 0.7, thank you very much!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---