#404 database migration
This commit is contained in:
parent
bccfc992a5
commit
f8cb89803a
5171
RMuseum/Migrations/20230801100845_NaskbanLink.Designer.cs
generated
Normal file
5171
RMuseum/Migrations/20230801100845_NaskbanLink.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
111
RMuseum/Migrations/20230801100845_NaskbanLink.cs
Normal file
111
RMuseum/Migrations/20230801100845_NaskbanLink.cs
Normal file
@ -0,0 +1,111 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace RMuseum.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class NaskbanLink : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsTextOriginalSource",
|
||||
table: "PinterestLinks",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "NaskbanLinkId",
|
||||
table: "PinterestLinks",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PDFBookId",
|
||||
table: "PinterestLinks",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PageNumber",
|
||||
table: "PinterestLinks",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PDFGanjoorLinks",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
GanjoorPostId = table.Column<int>(type: "int", nullable: false),
|
||||
GanjoorUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
GanjoorTitle = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PDFBookId = table.Column<int>(type: "int", nullable: false),
|
||||
PageNumber = table.Column<int>(type: "int", nullable: false),
|
||||
SuggestedById = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
SuggestionDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
ReviewerId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
ReviewDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
ReviewResult = table.Column<int>(type: "int", nullable: false),
|
||||
Synchronized = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsTextOriginalSource = table.Column<bool>(type: "bit", nullable: false),
|
||||
PDFPageTitle = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ExternalThumbnailImageUrl = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PDFGanjoorLinks", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PDFGanjoorLinks_AspNetUsers_ReviewerId",
|
||||
column: x => x.ReviewerId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_PDFGanjoorLinks_AspNetUsers_SuggestedById",
|
||||
column: x => x.SuggestedById,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PDFGanjoorLinks_ReviewerId",
|
||||
table: "PDFGanjoorLinks",
|
||||
column: "ReviewerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PDFGanjoorLinks_SuggestedById",
|
||||
table: "PDFGanjoorLinks",
|
||||
column: "SuggestedById");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PDFGanjoorLinks");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsTextOriginalSource",
|
||||
table: "PinterestLinks");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NaskbanLinkId",
|
||||
table: "PinterestLinks");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PDFBookId",
|
||||
table: "PinterestLinks");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PageNumber",
|
||||
table: "PinterestLinks");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2596,6 +2596,63 @@ namespace RMuseum.Migrations
|
||||
b.ToTable("GanjoorLinks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.GanjoorIntegration.PDFGanjoorLink", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("ExternalThumbnailImageUrl")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("GanjoorPostId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("GanjoorTitle")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("GanjoorUrl")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsTextOriginalSource")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("PDFBookId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("PDFPageTitle")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("PageNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("ReviewDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("ReviewResult")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("ReviewerId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("SuggestedById")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("SuggestionDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<bool>("Synchronized")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ReviewerId");
|
||||
|
||||
b.HasIndex("SuggestedById");
|
||||
|
||||
b.ToTable("PDFGanjoorLinks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.GanjoorIntegration.PinterestLink", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@ -2617,12 +2674,24 @@ namespace RMuseum.Migrations
|
||||
b.Property<string>("GanjoorUrl")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsTextOriginalSource")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<Guid?>("ItemId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("LinkType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("NaskbanLinkId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("PDFBookId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("PageNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("PinterestImageUrl")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
@ -4661,6 +4730,23 @@ namespace RMuseum.Migrations
|
||||
b.Navigation("SuggestedBy");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.GanjoorIntegration.PDFGanjoorLink", b =>
|
||||
{
|
||||
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "Reviewer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ReviewerId");
|
||||
|
||||
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "SuggestedBy")
|
||||
.WithMany()
|
||||
.HasForeignKey("SuggestedById")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Reviewer");
|
||||
|
||||
b.Navigation("SuggestedBy");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.GanjoorIntegration.PinterestLink", b =>
|
||||
{
|
||||
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", "Artifact")
|
||||
|
||||
@ -3841,6 +3841,18 @@
|
||||
<member name="M:RMuseum.Migrations.FTPQ.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:RMuseum.Migrations.NaskbanLink">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:RMuseum.Migrations.NaskbanLink.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:RMuseum.Migrations.NaskbanLink.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:RMuseum.Migrations.NaskbanLink.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:RMuseum.Models.Accounting.DonationExpenditure">
|
||||
<summary>
|
||||
donation expenditures
|
||||
|
||||
Loading…
Reference in New Issue
Block a user