On 6 Feb 2006, at 17:42, Wade Leftwich wrote:

Now for InnoDB support on the table.create() side.

For MySQL version >= 4.1.2, the db engine will automatically create the
appropriate foreign key index, so stock Sqlalchemy table.create()
behavior should work just fine -- provided you have already set the
default table type to InnoDB, either in my.cnf or by saying
engine.execute("SET @@table_type = 'InnoDB'", {}).

(My own MySQL setup is 4.0.something, so I can't actually test this.)

I've already tried it, it works fine (I have 4.1.13).

For MySql 3.23.44 <= version < 4.1.2, the CREATE TABLE statement must
explicitly name the foreign key indexes to be created, so as Sqlalchemy now stands the table.create() method will not work with an InnoDB table
that has foreign keys.

Ah, that's a bit of a pain.  Not too hard to fix though I don't think.

Kind regards,

Alastair.

--
http://www.alastairs-place.net




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to