> The MyISAM storage engine doesn't retain foreign key information- to
> autoload FKs you must create the table with a storage engine that
> supports FKs such as InnoDB.  That looks like:
>
>     Table('stats', metadata, ..columns.., mysql_engine='InnodB')
>
> You can also use ALTER TABLE via mysql to change the storage engine and
> add foreign keys if you've already got these MyISAM tables in production
> (see the mysql docs.)

Thanks Jason. The concept of which engine mySQL was using didn't come
into my head. i just used the default.

> Supplying an explicit ForeignKeyConstraint clause for an autoloaded
> MyISAM table is just fine too, if you want to keep using that storage
> engine.

This is what I've done right now.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to