CodoMetis.EFCore.SchemaKit.PostgreSQL 11.0.0-preview.1

Prefix Reserved
This is a prerelease version of CodoMetis.EFCore.SchemaKit.PostgreSQL.
dotnet add package CodoMetis.EFCore.SchemaKit.PostgreSQL --version 11.0.0-preview.1
                    
NuGet\Install-Package CodoMetis.EFCore.SchemaKit.PostgreSQL -Version 11.0.0-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodoMetis.EFCore.SchemaKit.PostgreSQL" Version="11.0.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodoMetis.EFCore.SchemaKit.PostgreSQL" Version="11.0.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="CodoMetis.EFCore.SchemaKit.PostgreSQL" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodoMetis.EFCore.SchemaKit.PostgreSQL --version 11.0.0-preview.1
                    
#r "nuget: CodoMetis.EFCore.SchemaKit.PostgreSQL, 11.0.0-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodoMetis.EFCore.SchemaKit.PostgreSQL@11.0.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodoMetis.EFCore.SchemaKit.PostgreSQL&version=11.0.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CodoMetis.EFCore.SchemaKit.PostgreSQL&version=11.0.0-preview.1&prerelease
                    
Install as a Cake Tool

CodoMetis.EFCore.SchemaKit.PostgreSQL

Schema objects of PostgreSQL that EF Core 11 and Npgsql 11 have no API for, declared in the model and carried by every migration path: migrations add, EnsureCreated(), GenerateCreateScript() and the pending-changes check. In this preview: exclusion constraints, on PostgreSQL 16 and 18.

services.AddDbContext<AppDbContext>(options => options.UseNpgsql(connectionString, o => o.UseSchemaKit()));
modelBuilder.Entity<RoleGrant>().DeclarePostgres(pg =>
[
    pg.Exclusion(
        pg.Equal(x => x.GranteeId).Equal(x => x.RoleId).Overlaps(x => x.Period),
        where: x => x.RevokedOn == null,
        deferral: Deferral.InitiallyDeferred,
        name: "ex_role_grant_active_period"),
]);

The migration adds btree_gist when an element needs it, then the constraint, as SQL.

The package depends on CodoMetis.EFCore.SchemaKit at exactly its own version; update the two together. It is built against EF Core 11 and Npgsql.EntityFrameworkCore.PostgreSQL 11.0.0-rc.3.

This is a preview. Any API may change between previews, and so may the stored form of a declaration in the model snapshot: a later preview may ask for the migrations to be scaffolded again. That does not change a database already built, so try a preview on a database you can build again. The permanent promise starts at 11.0.0. What the preview does not do yet is listed in the README.

Coming from EFCore.ComplexIndexes 5.x: the guide. Documentation, the design and the issues are in the repository.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.0-preview.1 42 11/18/2026