#3615: Can't define forward references in fixtures using MySQL with InnoDB
-----------------------------------------------------+----------------------
   Reporter:  russellm                               |                Owner:  
adrian          
     Status:  new                                    |            Component:  
Database wrapper
    Version:  SVN                                    |           Resolution:    
              
   Keywords:  mysql innodb myisam reference fixture  |                Stage:  
Accepted        
  Has_patch:  0                                      |           Needs_docs:  0 
              
Needs_tests:  0                                      |   Needs_better_patch:  0 
              
-----------------------------------------------------+----------------------
Changes (by Andrew Sutherland <[EMAIL PROTECTED]>):

 * cc: [EMAIL PROTECTED] (added)

Comment:

 I had this problem and needed a quick solution; I've attached a patch but
 am not setting the patch flag because even if the work-around is
 reasonable, this patch is ugly.  I'm providing it to make life easier for
 anyone else in the same boat.  (Which be most people using InnoDB; I'm
 sure fancy people just go straight to Postgres.)
 
 The patch adds
 _disable_broken_foreign_key_checks/_enable_broken_foreign_key_checks to
 all DatabaseWrapper classes and modifies
 enter_transaction_management/leave_transaction_management in
 db/transaction.py to invoke these methods.  According to the existing
 idiom, it seems like it would be more appropriate to have the SQL logic
 exist inside get_* functions in the database back-end's base.py file.
 However, that still doesn't feel right because only MySQL/InnoDB has the
 issue.  A better solution feels like letting the MySQL db back-end
 decorate the transaction process, but that still looks likes all back-ends
 would need to be changed in some fashion.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3615#comment:2>
Django Code <http://code.djangoproject.com/>
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to