There's a thread from June 28 '06 on this list about changing MySQL's storage engine from InnoDB to MyISAM for a particular table/model.
Now, an InnoDB table respects foreign keys, and a MyISAM table ignores them. An "ALTER TABLE ... ENGINE = MyISAM" statement will fail if the table has any foreign keys defined. On the other hand, a "CREATE TABLE ... ENGINE = MyISAM" statement with foriegn key definitions works, silently ignoring the foreign keys. Subsequent "ALTER TABLE ... ADD CONSTRSAINT ... FOREIGN KEY..." are also silently ignored. So it seems here's a case where some extension to let the django app writer modify the "CREATE" sql would be very handy. I don't suppose anyone has a patch ready for it?http://code.djangoproject.com/ticket/ 347 implies such a thing would be frowned upon, but I'd rather have an unsupported patch then have to abandon "manage.py test" due to SQL errors... if not, I believe the shortest path would be a "pre_db_table" signal, which I should be able to whip up quickly. I suppose one could drop the foreign key constraints before altering the table, but it looks like they're named with some random characters in it. So one would have to look at the metadata, get the FK constraint name, and use that in generating the SQL: ugly, and more a job for Python, not the SQL that gets run by syncdb... What to do... (and I can't set the default storage type, since the app's deployed to a remote host, where we don't have access to the MySQL setup) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---