fixing migrations and adding code coverage