docs: trying to improve updating related sections process

This commit is contained in:
Hamid Reza Mohammadi 2022-07-17 15:51:43 +04:30
parent 7c617f7650
commit 943a00982f
4 changed files with 4363 additions and 0 deletions

View File

@ -188,6 +188,9 @@ namespace RMuseum.DbContext
builder.Entity<GanjoorPoemSection>()
.HasIndex(v => new { v.GanjoorMetreId, v.RhymeLetters, v.Id});
builder.Entity<GanjoorPoemSection>()
.HasIndex(v => new { v.GanjoorMetreId, v.RhymeLetters, v.SectionType });
builder.Entity<GanjoorCachedRelatedSection>()
.HasIndex(v => new { v.PoemId, v.SectionIndex });
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RMuseum.Migrations
{
public partial class GanjoorPoemSectionNewIndex : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_GanjoorPoemSections_GanjoorMetreId_RhymeLetters_SectionType",
table: "GanjoorPoemSections",
columns: new[] { "GanjoorMetreId", "RhymeLetters", "SectionType" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_GanjoorPoemSections_GanjoorMetreId_RhymeLetters_SectionType",
table: "GanjoorPoemSections");
}
}
}

View File

@ -1359,6 +1359,8 @@ namespace RMuseum.Migrations
b.HasIndex("GanjoorMetreId", "RhymeLetters", "Id");
b.HasIndex("GanjoorMetreId", "RhymeLetters", "SectionType");
b.ToTable("GanjoorPoemSections");
});