Re: Fixtures: core.serializers.sort_dependencies sorts models in the wrong order for FK constraints

2018-05-06 Thread Andrew Wrigley
't be deserialised without violating FK constraints. Maybe this is a bug? I could --exclude thing, or manually control the serialisation order, but I'm hoping there is a more obvious solution I'm missing. On Sunday, May 6, 2018 at 7:30:31 AM UTC+2, Mike Dewhirst wrote: > > On 5/05/20

Fixtures: core.serializers.sort_dependencies sorts models in the wrong order for FK constraints

2018-05-04 Thread Andrew Wrigley
Hi all, I'm trying to dump a database fixture, and load it again to run tests. When I run `python manage.py test`, I get: > IntegrityError: Problem installing fixtures: insert or update on table > "publisher_journaldupextid" violates foreign key constraint > "publisher_journaldup_journa