Closed ovejorgensen closed 10 months ago
I can't reproduce this; I tried to start with the following minimal program:
await using var ctx = new BlogContext();
await ctx.Database.EnsureDeletedAsync();
await ctx.Database.EnsureCreatedAsync();
public class BlogContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder
.UseNpgsql(@"Host=localhost;Username=test;Password=test")
.LogTo(Console.WriteLine, LogLevel.Information)
.EnableSensitiveDataLogging();
}
public class Blog
{
public int Id { get; set; }
// public NpgsqlTsVector SearchVector { get; set; }
}
I created a migration (dotnet ef migrations add initial
), then uncommented the NpgsqlTsVector property, and then created a second migration; this worked just fine (with EF Core 8.0).
Please provide similar step-by-step instructions on how to reproduce the error.
Thanks for the answer! I did some more testing and it turns out that the EntityGraphQL
package was causing the problem.
This error occur when making a new migration after adding a
public NpgsqlTsVector SearchVector {get; set;}
property in an entity model.Tested on latest versions of .NET 7/8 and Npgsql