Test database using migrations

The test db for each test is now created with migrations.
This is required for fulltext indexes which cant be created with
metadata.

Change-Id: I3e1537a67570b5e1ac588f8fc188dab3d0e34a3d
Merge "Test database using migrations"