refactors into helper methods and adds migration for column types back t...

...o int