Add --migrate command
This runs database migrations and obviates the need for manually running changes.
Ref T509