Concept
Cross-database support is not a checkbox. Phase 3 keeps the same domain invariant while admitting that Postgres and Oracle enforce it differently.
Task
- Add an Oracle profile and vendor-split Flyway migrations.
- Document identity, pagination, type mappings, timestamp semantics, and overlap strategy in oracle-notes.md.
- Parameterize the invariant suite across database lanes.
- Use a screen-row SELECT FOR UPDATE trigger as the Oracle overlap strategy.
Run
./gradlew test --tests "*CrossDatabaseInvariantSuiteTest"Expected Result
- The shared suite names duplicate showtime, concurrent overlap, optimistic locking, stable pagination, lazy boundary, and DST round-trip proofs.
Common Traps
- Pretending Oracle can use the Postgres tstzrange exclusion constraint.
- Testing only repository happy paths and calling it database compatibility.
- Leaving timezone behavior implicit.
Hint Ladder
Hint 1
Keep the invariant stable even when the mechanism changes.
Hint 2
Use notes for every divergence; memory is not a strategy.
Hint 3
The heavy Oracle lane belongs on main pushes and release PRs, not every docs-only edit.
Solution
See docs/oracle-notes.md and CrossDatabaseInvariantSuiteTest.java.