Create a migrate.js file to handle data migration

I think this can be renamed to just `migrate` (`doMigration` sounds passive and awkward).