EF Core PostgreSQL Migration Sql Generator modification

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
BlackDice
Posts: 2
Joined: Sat 06 Jun 2020 16:23

EF Core PostgreSQL Migration Sql Generator modification

Post by BlackDice » Mon 29 Jun 2020 09:26

Good day!
Please tell me if it is possible to modify the migration sql generator for EF Core 3 in dotConnect for PostgreSql (v.7.17.1612.0)?
I need to add a condition to a unique index, and at the moment I see no other way to do this, except to use raw sql on MigrationBuilder.
All classes that could help to modify the migration are either internal or do not provide an interface for overriding.
I've tried using HasFilter extension on IndexBuilder, but it seems, that PgMigrationSqlBuilder ignores this parameter.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: EF Core PostgreSQL Migration Sql Generator modification

Post by Shalex » Mon 13 Jul 2020 09:18

Thank you for your report. We will investigate the issue with HasFilter extension on IndexBuilder and notify you about the result.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: EF Core PostgreSQL Migration Sql Generator modification

Post by Shalex » Thu 30 Sep 2021 12:44

The HasFilter extension on IndexBuilder in EF Core Migrations is supported in EF Core 3 and EF Core 5.

Refer to viewtopic.php?f=3&t=48312.

Post Reply