#109 GanjoorHealthCheckError db migration

This commit is contained in:
Hamid Reza Mohammadi 2021-04-30 10:33:14 +04:30
parent d0bad3565a
commit 3f7aa6a3b2
4 changed files with 2728 additions and 17 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace RMuseum.Migrations
{
public partial class GanjoorHealthCheckError : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "GanjoorHealthCheckErrors",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ReferrerPageUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
BrokenLink = table.Column<bool>(type: "bit", nullable: false),
MulipleTargets = table.Column<bool>(type: "bit", nullable: false),
TargetUrl = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_GanjoorHealthCheckErrors", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "GanjoorHealthCheckErrors");
}
}
}

View File

@ -15,8 +15,8 @@ namespace RMuseum.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.5")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
@ -443,6 +443,30 @@ namespace RMuseum.Migrations
b.ToTable("GanjoorReportedComments");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorHealthCheckError", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<bool>("BrokenLink")
.HasColumnType("bit");
b.Property<bool>("MulipleTargets")
.HasColumnType("bit");
b.Property<string>("ReferrerPageUrl")
.HasColumnType("nvarchar(max)");
b.Property<string>("TargetUrl")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("GanjoorHealthCheckErrors");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorMetre", b =>
{
b.Property<int>("Id")
@ -1473,18 +1497,18 @@ namespace RMuseum.Migrations
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("NormalizedName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasDatabaseName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
b.ToTable("AspNetRoles");
@ -1510,8 +1534,8 @@ namespace RMuseum.Migrations
.HasColumnType("datetime2");
b.Property<string>("Email")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<bool>("EmailConfirmed")
.HasColumnType("bit");
@ -1529,12 +1553,12 @@ namespace RMuseum.Migrations
.HasColumnType("nvarchar(max)");
b.Property<string>("NormalizedEmail")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("NormalizedUserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("PasswordHash")
.HasColumnType("nvarchar(max)");
@ -1561,8 +1585,8 @@ namespace RMuseum.Migrations
.HasColumnType("bit");
b.Property<string>("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("Website")
.HasColumnType("nvarchar(max)");
@ -1570,11 +1594,11 @@ namespace RMuseum.Migrations
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasName("EmailIndex");
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasName("UserNameIndex")
.HasDatabaseName("UserNameIndex")
.HasFilter("[NormalizedUserName] IS NOT NULL");
b.HasIndex("RImageId");
@ -1927,6 +1951,8 @@ namespace RMuseum.Migrations
.HasForeignKey("CoverImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CoverImage");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RTagValue", b =>
@ -1944,6 +1970,8 @@ namespace RMuseum.Migrations
.HasForeignKey("RTagId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RTag");
});
modelBuilder.Entity("RMuseum.Models.Bookmark.RUserBookmark", b =>
@ -1961,6 +1989,12 @@ namespace RMuseum.Migrations
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", "RArtifactMasterRecord")
.WithMany()
.HasForeignKey("RArtifactMasterRecordId");
b.Navigation("RAppUser");
b.Navigation("RArtifactItemRecord");
b.Navigation("RArtifactMasterRecord");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorCat", b =>
@ -1974,6 +2008,10 @@ namespace RMuseum.Migrations
.HasForeignKey("PoetId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Parent");
b.Navigation("Poet");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorComment", b =>
@ -1991,6 +2029,12 @@ namespace RMuseum.Migrations
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "User")
.WithMany()
.HasForeignKey("UserId");
b.Navigation("InReplyTo");
b.Navigation("Poem");
b.Navigation("User");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorCommentAbuseReport", b =>
@ -2004,6 +2048,10 @@ namespace RMuseum.Migrations
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "ReportedBy")
.WithMany()
.HasForeignKey("ReportedById");
b.Navigation("GanjoorComment");
b.Navigation("ReportedBy");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorPage", b =>
@ -2027,6 +2075,16 @@ namespace RMuseum.Migrations
b.HasOne("RMuseum.Models.Ganjoor.GanjoorPoet", "SecondPoet")
.WithMany()
.HasForeignKey("SecondPoetId");
b.Navigation("Cat");
b.Navigation("Parent");
b.Navigation("Poem");
b.Navigation("Poet");
b.Navigation("SecondPoet");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorPageSnapshot", b =>
@ -2042,6 +2100,10 @@ namespace RMuseum.Migrations
.HasForeignKey("MadeObsoleteByUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("GanjoorPage");
b.Navigation("MadeObsoleteByUser");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorPoem", b =>
@ -2055,6 +2117,10 @@ namespace RMuseum.Migrations
b.HasOne("RMuseum.Models.Ganjoor.GanjoorMetre", "GanjoorMetre")
.WithMany()
.HasForeignKey("GanjoorMetreId");
b.Navigation("Cat");
b.Navigation("GanjoorMetre");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorPoet", b =>
@ -2062,6 +2128,8 @@ namespace RMuseum.Migrations
b.HasOne("RSecurityBackend.Models.Image.RImage", "RImage")
.WithMany()
.HasForeignKey("RImageId");
b.Navigation("RImage");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorSiteBanner", b =>
@ -2071,6 +2139,8 @@ namespace RMuseum.Migrations
.HasForeignKey("RImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RImage");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.GanjoorVerse", b =>
@ -2080,6 +2150,8 @@ namespace RMuseum.Migrations
.HasForeignKey("PoemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Poem");
});
modelBuilder.Entity("RMuseum.Models.Ganjoor.PoemMusicTrack", b =>
@ -2105,6 +2177,16 @@ namespace RMuseum.Migrations
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "SuggestedBy")
.WithMany()
.HasForeignKey("SuggestedById");
b.Navigation("GanjoorTrack");
b.Navigation("GolhaTrack");
b.Navigation("Poem");
b.Navigation("Singer");
b.Navigation("SuggestedBy");
});
modelBuilder.Entity("RMuseum.Models.GanjoorAudio.Recitation", b =>
@ -2118,6 +2200,10 @@ namespace RMuseum.Migrations
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "Reviewer")
.WithMany()
.HasForeignKey("ReviewerId");
b.Navigation("Owner");
b.Navigation("Reviewer");
});
modelBuilder.Entity("RMuseum.Models.GanjoorAudio.RecitationPublishingTracker", b =>
@ -2127,6 +2213,8 @@ namespace RMuseum.Migrations
.HasForeignKey("PoemNarrationId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("PoemNarration");
});
modelBuilder.Entity("RMuseum.Models.GanjoorAudio.UserRecitationProfile", b =>
@ -2136,6 +2224,8 @@ namespace RMuseum.Migrations
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
modelBuilder.Entity("RMuseum.Models.GanjoorIntegration.GanjoorLink", b =>
@ -2159,6 +2249,14 @@ namespace RMuseum.Migrations
.HasForeignKey("SuggestedById")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Artifact");
b.Navigation("Item");
b.Navigation("Reviewer");
b.Navigation("SuggestedBy");
});
modelBuilder.Entity("RMuseum.Models.GanjoorIntegration.PinterestLink", b =>
@ -2178,6 +2276,14 @@ namespace RMuseum.Migrations
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "SuggestedBy")
.WithMany()
.HasForeignKey("SuggestedById");
b.Navigation("Artifact");
b.Navigation("Item");
b.Navigation("Reviewer");
b.Navigation("SuggestedBy");
});
modelBuilder.Entity("RMuseum.Models.ImportJob.ImportJob", b =>
@ -2185,6 +2291,8 @@ namespace RMuseum.Migrations
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", "Artifact")
.WithMany()
.HasForeignKey("ArtifactId");
b.Navigation("Artifact");
});
modelBuilder.Entity("RMuseum.Models.MusicCatalogue.GanjoorAlbum", b =>
@ -2194,6 +2302,8 @@ namespace RMuseum.Migrations
.HasForeignKey("SingerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Singer");
});
modelBuilder.Entity("RMuseum.Models.MusicCatalogue.GanjoorTrack", b =>
@ -2203,6 +2313,8 @@ namespace RMuseum.Migrations
.HasForeignKey("AlbumId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Album");
});
modelBuilder.Entity("RMuseum.Models.MusicCatalogue.GolhaProgram", b =>
@ -2212,6 +2324,8 @@ namespace RMuseum.Migrations
.HasForeignKey("GolhaCollectionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("GolhaCollection");
});
modelBuilder.Entity("RMuseum.Models.MusicCatalogue.GolhaTrack", b =>
@ -2225,6 +2339,10 @@ namespace RMuseum.Migrations
b.HasOne("RMuseum.Models.MusicCatalogue.GanjoorSinger", "Singer")
.WithMany()
.HasForeignKey("SingerId");
b.Navigation("GolhaProgram");
b.Navigation("Singer");
});
modelBuilder.Entity("RMuseum.Models.Note.RUserNote", b =>
@ -2246,6 +2364,14 @@ namespace RMuseum.Migrations
b.HasOne("RMuseum.Models.Note.RUserNote", "ReferenceNote")
.WithMany()
.HasForeignKey("ReferenceNoteId");
b.Navigation("RAppUser");
b.Navigation("RArtifactItemRecord");
b.Navigation("RArtifactMasterRecord");
b.Navigation("ReferenceNote");
});
modelBuilder.Entity("RMuseum.Models.UploadSession.UploadSession", b =>
@ -2253,6 +2379,8 @@ namespace RMuseum.Migrations
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "User")
.WithMany()
.HasForeignKey("UserId");
b.Navigation("User");
});
modelBuilder.Entity("RMuseum.Models.UploadSession.UploadSessionFile", b =>
@ -2269,6 +2397,8 @@ namespace RMuseum.Migrations
b.HasOne("RSecurityBackend.Models.Image.RImage", "RImage")
.WithMany()
.HasForeignKey("RImageId");
b.Navigation("RImage");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RCaptchaImage", b =>
@ -2278,6 +2408,8 @@ namespace RMuseum.Migrations
.HasForeignKey("RImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RImage");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RPermission", b =>
@ -2294,6 +2426,8 @@ namespace RMuseum.Migrations
.HasForeignKey("RAppUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RAppUser");
});
modelBuilder.Entity("RSecurityBackend.Models.Notification.RUserNotification", b =>
@ -2303,6 +2437,8 @@ namespace RMuseum.Migrations
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RPictureFile", b =>
@ -2311,6 +2447,50 @@ namespace RMuseum.Migrations
.WithMany("Images")
.HasForeignKey("RArtifactItemRecordId");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RArtifactItemRecord", b =>
{
b.Navigation("Images");
b.Navigation("Tags");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RArtifactMasterRecord", b =>
{
b.Navigation("Items");
b.Navigation("Tags");
});
modelBuilder.Entity("RMuseum.Models.MusicCatalogue.GanjoorAlbum", b =>
{
b.Navigation("Tracks");
});
modelBuilder.Entity("RMuseum.Models.MusicCatalogue.GanjoorSinger", b =>
{
b.Navigation("Albums");
});
modelBuilder.Entity("RMuseum.Models.MusicCatalogue.GolhaCollection", b =>
{
b.Navigation("Programs");
});
modelBuilder.Entity("RMuseum.Models.MusicCatalogue.GolhaProgram", b =>
{
b.Navigation("Tracks");
});
modelBuilder.Entity("RMuseum.Models.UploadSession.UploadSession", b =>
{
b.Navigation("UploadedFiles");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RAppRole", b =>
{
b.Navigation("Permissions");
});
#pragma warning restore 612, 618
}
}

View File

@ -1,5 +1,5 @@
{
"sdk": {
"version": "3.1.200"
"version": "5.0.201"
}
}