Foreign keys need to be created after the respective tables are already in place. This order makes sure this is the case.