Move migrations to its own JS file.