#2720: Wrong syntax generated for foreign keys under MySQL/InnoDB 5.0.22
--------------------------------+-------------------------------------------
 Reporter:  anonymous           |        Owner:  adrian
     Type:  defect              |       Status:  new   
 Priority:  high                |    Milestone:        
Component:  Database wrapper    |      Version:        
 Severity:  normal              |   Resolution:        
 Keywords:  innodb foreign key  |  
--------------------------------+-------------------------------------------
Comment (by Joakim Sernbrant <[EMAIL PROTECTED]>):

 With mysql/innodb you need to use the CONSTRAINT... syntax, the first form
 is just a "comment" (this fact is hidden in the docs somewhere):
 
 {{{
 CREATE TABLE `test_bar` (
     `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
     `foo_id` integer NOT NULL REFERENCES `test_foo` (`id`),
     CONSTRAINT FOREIGN KEY (`foo_id`) REFERENCES `test_foo` (`id`)
 );
 }}}
 
 I have a patch for this and some other db related things I will submit in
 the near future.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2720>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to