Added foreign key constraints.