Migrate population script to active record and merge population and migration scripts