Adding stub targeting
This commit is contained in:
@@ -104,12 +104,17 @@ public sealed class AppDbContext : DbContext
|
||||
e.ToTable("ManagedPage");
|
||||
e.HasKey(x => x.Id);
|
||||
e.Property(x => x.Key).HasMaxLength(100).IsRequired();
|
||||
e.Property(x => x.Stub).HasMaxLength(100);
|
||||
e.Property(x => x.NormalizedStub).HasMaxLength(100);
|
||||
e.Property(x => x.DisplayName).HasMaxLength(200).IsRequired();
|
||||
e.Property(x => x.PageKind).HasMaxLength(50).IsRequired();
|
||||
e.Property(x => x.RecurrenceRule).HasMaxLength(200);
|
||||
e.Property(x => x.LastUpdatedBy).HasMaxLength(200).IsRequired();
|
||||
e.Property(x => x.ContentJson).IsRequired();
|
||||
e.HasIndex(x => x.Key).IsUnique();
|
||||
e.HasIndex(x => new { x.PageKind, x.NormalizedStub })
|
||||
.IsUnique()
|
||||
.HasFilter("[NormalizedStub] IS NOT NULL");
|
||||
e.HasIndex(x => new { x.PageKind, x.IsEnabled, x.Priority });
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user