Fix some tests. Cast migrations to objects.