id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 6410,A simple patch to solve MySQL constrain problem while dumpdata.,bear330,nobody,"The [http://www.djangoproject.com/documentation/django-admin/#loaddata-fixture-fixture] documentation mentioned: '''MySQL doesn’t provide a mechanism to defer checking of row constraints until a transaction is committed.''' This problem can be solved by a simple modification to one line code in django.db.models.loading.py: The original code: model_dict = self.app_models.setdefault(app_label, {}) Patched code: model_dict = self.app_models.setdefault(app_label, SortedDict()) This modification make us to define the table sequence of app models by our will. We know the constrain between models, SortedDict make app_models store models as we defined. This will be helpful while dumpdata and some other problems. Thanks. ",,closed,Core (Other),dev,,duplicate,dumpdata constrain,,Unreviewed,0,0,0,0,0,0