Fixes unit test and another potential migration problem using an old alias for foreign key