docs: #327 db migration for edit/delete fields

This commit is contained in:
Hamid Reza Mohammadi 2022-05-26 19:29:47 +04:30
parent e4dbd03ede
commit 4f4d4d2e43
3 changed files with 4415 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,68 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RMuseum.Migrations
{
public partial class CorrectionVPosDel : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "MarkForDelete",
table: "GanjoorVerseVOrderText",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<int>(
name: "MarkForDeleteResult",
table: "GanjoorVerseVOrderText",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "OriginalVersePosition",
table: "GanjoorVerseVOrderText",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "VersePosition",
table: "GanjoorVerseVOrderText",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "VersePositionResult",
table: "GanjoorVerseVOrderText",
type: "int",
nullable: false,
defaultValue: 0);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MarkForDelete",
table: "GanjoorVerseVOrderText");
migrationBuilder.DropColumn(
name: "MarkForDeleteResult",
table: "GanjoorVerseVOrderText");
migrationBuilder.DropColumn(
name: "OriginalVersePosition",
table: "GanjoorVerseVOrderText");
migrationBuilder.DropColumn(
name: "VersePosition",
table: "GanjoorVerseVOrderText");
migrationBuilder.DropColumn(
name: "VersePositionResult",
table: "GanjoorVerseVOrderText");
}
}
}

View File

@ -1863,9 +1863,18 @@ namespace RMuseum.Migrations
b.Property<int?>("GanjoorPoemCorrectionId")
.HasColumnType("int");
b.Property<bool>("MarkForDelete")
.HasColumnType("bit");
b.Property<int>("MarkForDeleteResult")
.HasColumnType("int");
b.Property<string>("OriginalText")
.HasColumnType("nvarchar(max)");
b.Property<int?>("OriginalVersePosition")
.HasColumnType("int");
b.Property<int>("Result")
.HasColumnType("int");
@ -1878,6 +1887,12 @@ namespace RMuseum.Migrations
b.Property<int>("VORder")
.HasColumnType("int");
b.Property<int?>("VersePosition")
.HasColumnType("int");
b.Property<int>("VersePositionResult")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("GanjoorPoemCorrectionId");