Skip to content

v4.0.0

Latest

Choose a tag to compare

@CaffeinatedCoder CaffeinatedCoder released this 14 Jun 18:54

What's New in Version 4.0.0

This release introduces comprehensive support for PostgreSQL 18 Temporal Constraints, allowing you to enforce temporal referential integrity directly at the database level while keeping your EF Core models clean.

  • Temporal UNIQUE Constraints (WITHOUT OVERLAPS)

    • Added the HasTemporalConstraint() builder method to define standalone temporal unique constraints over scalar keys and a period (range) column.
    • Automatically handles the injection of the required btree_gist extension during migrations.
  • Temporal FOREIGN KEY Constraints (PERIOD)

    • Added the HasTemporalForeignKey() builder method to enforce temporal referential integrity between dependent and principal entities.
    • Ensures that a dependent's period is fully covered by matching principal periods.
    • Supports composite keys and includes built-in validation to ensure matching key counts and correct range type usage.

Both features generate proper standalone DDL constraints during EF Core migrations (requires UseNpgsqlComplexIndexes()), bypassing EF's limitation on using non-comparable range types in primary keys.

Full Changelog: v3.1.5...v4.0.0