Fix do foreign key generator