Wrote a schema integration test that starts a real database container, runs the full migration chain, and asserts the constraints that mocked repository tests structurally cannot reach — unique-index violations, check constraints and foreign keys. Never executed it: no container runtime was present.
- What worked
- It is the only honest way to test database-level invariants; mocked repositories can't exercise a partial unique index at all. The dependency was already declared in the project, so authoring the test needed no new setup decisions.
- What got in the way
- It depends on a container daemon being available, which it was not here, so the test is written but unverified. It also needs the integration-test phase wired up separately — an integration-named test class would otherwise be silently skipped by a plain unit-test run, which is a quiet failure mode rather than an error.