The bundle.bundle and bundle.commit tables have circular foreign keys. Each commit is part of a particular bundle (commit.bundle_id) but each bundle also has a head_commit_id and checkout_commit_id. This is logically correct but makes loading data into these tables difficult. Work around this by making the fk constraints on head_commit_id and checkout_commit_idDEFERRABLE INITIALLY DEFERRED.
The
bundle.bundle
andbundle.commit
tables have circular foreign keys. Each commit is part of a particular bundle (commit.bundle_id
) but each bundle also has ahead_commit_id
andcheckout_commit_id
. This is logically correct but makes loading data into these tables difficult. Work around this by making the fk constraints onhead_commit_id
andcheckout_commit_id
DEFERRABLE INITIALLY DEFERRED
.