I will just restate my opinion from when we were initially discussing this. In my mind, we should NOT be covering migrations with integration tests (as in not making it a mandatory requirement).
Database migrations, whether SQL or Java, are written once and should not be modified ever again. Having an automated test brings us no value here, since that test will be verifying a piece of code that never changes and that executes in the same environment with the exact same data. That means, if that test passes once, there's no possible way it ever breaks (unless you modify the migration, what you should not do). Having tests that never fail is not something we want and it makes build take longer (those tests need to be executed each time).
Having said that, I don't think we should remove the base migration testing class that we have or currently written migration tests. The base class may be useful for other developers who are writing new migrations and are looking for a quick way to gain confidence on whether the migration works as expected (especially if it's more complex, and not just adding/dropping a column).
As for existing migration tests, one idea would be to have a separate gradle profile that would only run migration tests. The dev working on a new migration could then still write new tests and run that profile on demand locally.
Pros:
* The tests are in the codebase so the developer and code reviewer have better confidence the migration does what it's supposed to
* Those tests are run on demand in a separate profile and therefore don't make ITs take longer
Any thoughts?
Kind regards,
Sebastian.