add some foreign key constraints for registry table.