Added API support for migrations

**Why this is Necessary**
Consumer apps require UI's to process migrations. This adds a simple API for processing migrations without interfacing with the console.

Migration file detection is tightly coupled with the console, so some duplication was necessary here to avoid abstracting that. If I have time, I might add more coverage to the rest of the project to make refactoring that feasible.