Add tests for database migrations