move code to migration file