I m working with PostgresSql & EF core 3.1. I created an index for one of my entity as follow
builder.HasIndex(e => e.MerchantId).IncludeProperties(e=>e.TemplateType);
in migration file i can see the below
migrationBuilder.CreateIndex(
name: "IX_EmailTemplates_MerchantId",
table: "EmailTemplates",
column: "MerchantId")
.Annotation("Npgsql:IndexInclude", new[] { "TemplateType" });
When run update-database I m getting the below Error.
Failed executing DbCommand (24ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE INDEX "IX_EmailTemplates_MerchantId" ON "EmailTemplates" ("MerchantId") INCLUDE ("TemplateType");
fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
Failed executing DbCommand (24ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE INDEX "IX_EmailTemplates_MerchantId" ON "EmailTemplates" ("MerchantId") INCLUDE ("TemplateType");
**Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "INCLUDE"**
Any one can help me on this error ?
User contributions licensed under CC BY-SA 3.0