adding db index for GanjoorComments => CommentDate

This commit is contained in:
Hamid Reza Mohammadi 2021-05-06 10:10:11 +04:30
parent 221bb670bb
commit 0d6958b55a
4 changed files with 2527 additions and 0 deletions

View File

@ -88,6 +88,8 @@ namespace RMuseum.DbContext
builder.Entity<GanjoorTrack>()
.HasIndex(c => c.Name);
builder.Entity<GanjoorComment>()
.HasIndex(c => c.CommentDate);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace RMuseum.Migrations
{
public partial class CommentDateIndex : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_GanjoorComments_CommentDate",
table: "GanjoorComments",
column: "CommentDate");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_GanjoorComments_CommentDate",
table: "GanjoorComments");
}
}
}

View File

@ -406,6 +406,8 @@ namespace RMuseum.Migrations
b.HasKey("Id");
b.HasIndex("CommentDate");
b.HasIndex("InReplyToId");
b.HasIndex("PoemId");