diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2011-08-07 00:43:26 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2011-08-07 00:43:26 +0000 |
| commit | be87f0b0ec992e6f3e72735d8e95c654da969f6d (patch) | |
| tree | fa4d16b640e716dcd8271f2e6a7e3bb2953cbe5d /docs/ref/databases.txt | |
| parent | e3c89346d217fca92b62a6d11df6b4b6d5be28a2 (diff) | |
Fixed #3615: Added support for loading fixtures with forward references on database backends (such as MySQL/InnoDB) that do not support deferred constraint checking. Many thanks to jsdalton for coming up with a clever solution to this long-standing issue, and to jacob, ramiro, graham_king, and russellm for review/testing. (Apologies if I missed anyone else who helped here.)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/databases.txt')
| -rw-r--r-- | docs/ref/databases.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index 2f55b9c8c6..5a2042a02a 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -142,6 +142,18 @@ currently the only engine that supports full-text indexing and searching. The InnoDB_ engine is fully transactional and supports foreign key references and is probably the best choice at this point in time. +.. versionchanged:: 1.4 + +In previous versions of Django, fixtures with forward references (i.e. +relations to rows that have not yet been inserted into the database) would fail +to load when using the InnoDB storage engine. This was due to the fact that InnoDB +deviates from the SQL standard by checking foreign key constraints immediately +instead of deferring the check until the transaction is committed. This +problem has been resolved in Django 1.4. Fixture data is now loaded with foreign key +checks turned off; foreign key checks are then re-enabled when the data has +finished loading, at which point the entire table is checked for invalid foreign +key references and an `IntegrityError` is raised if any are found. + .. _storage engines: http://dev.mysql.com/doc/refman/5.5/en/storage-engines.html .. _MyISAM: http://dev.mysql.com/doc/refman/5.5/en/myisam-storage-engine.html .. _InnoDB: http://dev.mysql.com/doc/refman/5.5/en/innodb.html |
