Add foreign key constraints to all references