improve the migration generated method