Add tests for existing db migrations

Test case TestMigrations with existing db
migrations tests added to common code in
test_migration.

blueprint db-migration-tests

Change-Id: I94feb7720d5b99da3790ba344c9c97861bc8ae1b
Merge "Add tests for existing db migrations"