#3615: Can't define forward references in fixtures using MySQL with InnoDB
---------------------------------------------------+------------------------
          Reporter:  russellm                      |         Owner:  nobody     
                          
            Status:  new                           |     Milestone:             
                          
         Component:  Database layer (models, ORM)  |       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 tiliv):

 * cc: [email protected] (added)

Comment:

 This patch doesn't cleanly apply to trunk right now..

 This is a little troubling, since it means I either can't run InnoDB and
 properly use fixtures with json (which is what I gathered was the affected
 scope in #3620 ), or else I must change my db backend (!) to keep the
 referential integrity feature.  Neither of those routes is life-
 threatening, but neither is very convenient.  My personal thought on this
 is that somebody ought not be doing an unverified syncdb with initial_data
 on a live production database, therefore I find the reasoning for
 temporarily disallowing the foreign key checks a little on the insulting
 side.  A person's got to live with their own mistakes at some point.
 Since the documentation is ultimately the "we told you so", I'd very much
 like to see this problem addressed in a way that helps those of us
 victimized for the forward references issue, accompanied by a nice big
 warning, while still trying to uphold the spirit of referential integrity.

 Perhaps a special flag, as discussed in the comments above, could be
 allowed on loaddata for MySQL backends.  This forces you to know what it
 is you are asking Django to do and why, and to explicitly authorize the
 required action.

 I'll be following this ticket in hopes of some consensus in the upcoming
 months.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3615#comment:15>
Django <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