Defer creating foreign keys until as late as possible, to avoid foreign key constraint issues when creating
Merge pull request #293 from iarna/defer-creating-foreign-keys

Defer creating foreign keys until as late as possible, to avoid foreign key constraint issues when creating