Migrator creates the database if it doesn't exist.

Also updated unit tests.