djangosnippets.org: Latest snippets posted by cmgreenhttps://djangosnippets.org/users/cmgreen/2008-03-24T11:42:17.347911-05:00cmgreendumpdata/loaddata with MySQL and ForeignKeys (Revision 2)
2008-03-24T11:42:17.347911-05:00cmgreenhttps://djangosnippets.org/snippets/662/<p>nnoDB tables within MySQL have no ability to defer reference checking until after a transaction is complete. This prevents most dumpdata/loaddata cycles unless the dump order falls so that referenced models are dumped before models that depend on them.</p>
<p>This code uses Ofer Faigon's topological sort to sort the models …</p>
Freely redistributabledumpdata/loaddata with MySQL and ForeignKeys
2008-01-02T09:20:40.417055-06:00cmgreenhttps://djangosnippets.org/snippets/533/<p>InnoDB tables within MySQL have no ability to defer reference checking until after a transaction is complete. This prevents most dumpdata/loaddata cycles unless the dump order falls so that referenced models are dumped before models that depend on them.</p>
<p>This code uses <a href="http://www.bitformation.com">Ofer Faigon's</a> topological sort to sort the models …</p>
Freely redistributable