docs: #379 #380 database migration

This commit is contained in:
Hamid Reza Mohammadi 2023-04-08 20:24:58 +03:30
parent f0807ab327
commit 74984da9d8
4 changed files with 4649 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,80 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RMuseum.Migrations
{
/// <inheritdoc />
public partial class CatFields : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "BookName",
table: "GanjoorCategories",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "MapName",
table: "GanjoorCategories",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "RImageId",
table: "GanjoorCategories",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "SumUpSubsGeoLocations",
table: "GanjoorCategories",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.CreateIndex(
name: "IX_GanjoorCategories_RImageId",
table: "GanjoorCategories",
column: "RImageId");
migrationBuilder.AddForeignKey(
name: "FK_GanjoorCategories_GeneralImages_RImageId",
table: "GanjoorCategories",
column: "RImageId",
principalTable: "GeneralImages",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_GanjoorCategories_GeneralImages_RImageId",
table: "GanjoorCategories");
migrationBuilder.DropIndex(
name: "IX_GanjoorCategories_RImageId",
table: "GanjoorCategories");
migrationBuilder.DropColumn(
name: "BookName",
table: "GanjoorCategories");
migrationBuilder.DropColumn(
name: "MapName",
table: "GanjoorCategories");
migrationBuilder.DropColumn(
name: "RImageId",
table: "GanjoorCategories");
migrationBuilder.DropColumn(
name: "SumUpSubsGeoLocations",
table: "GanjoorCategories");
}
}
}

View File

@ -618,6 +618,9 @@ namespace RMuseum.Migrations
b.Property<int>("Id")
.HasColumnType("int");
b.Property<string>("BookName")
.HasColumnType("nvarchar(max)");
b.Property<int>("CatType")
.HasColumnType("int");
@ -630,6 +633,9 @@ namespace RMuseum.Migrations
b.Property<string>("FullUrl")
.HasColumnType("nvarchar(450)");
b.Property<string>("MapName")
.HasColumnType("nvarchar(max)");
b.Property<int>("MixedModeOrder")
.HasColumnType("int");
@ -642,6 +648,12 @@ namespace RMuseum.Migrations
b.Property<bool>("Published")
.HasColumnType("bit");
b.Property<Guid?>("RImageId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("SumUpSubsGeoLocations")
.HasColumnType("bit");
b.Property<int>("TableOfContentsStyle")
.HasColumnType("int");
@ -657,6 +669,8 @@ namespace RMuseum.Migrations
b.HasIndex("PoetId");
b.HasIndex("RImageId");
b.HasIndex("ParentId", "PoetId");
SqlServerIndexBuilderExtensions.IncludeProperties(b.HasIndex("ParentId", "PoetId"), new[] { "Id" });
@ -3601,9 +3615,15 @@ namespace RMuseum.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RSecurityBackend.Models.Image.RImage", "RImage")
.WithMany()
.HasForeignKey("RImageId");
b.Navigation("Parent");
b.Navigation("Poet");
b.Navigation("RImage");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorCenturyPoet", b =>

View File

@ -3222,6 +3222,18 @@
<member name="M:RMuseum.Migrations.PCPoemFormat.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
<inheritdoc />
</member>
<member name="T:RMuseum.Migrations.CatFields">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.CatFields.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.CatFields.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
<inheritdoc />
</member>
<member name="M:RMuseum.Migrations.CatFields.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
<inheritdoc />
</member>
<member name="T:RMuseum.Models.Accounting.DonationExpenditure">
<summary>
donation expenditures