#255 adding db migration
This commit is contained in:
parent
28a60ae901
commit
293ed9afe4
@ -395,5 +395,10 @@ namespace RMuseum.DbContext
|
||||
/// </summary>
|
||||
public DbSet<RUserNoteAbuseReport> ReportedUserNotes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// recitation error reports
|
||||
/// </summary>
|
||||
public DbSet<RecitationErrorReport> RecitationErrorReports { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
3508
RMuseum/Migrations/20211208162642_RecitationErrors.Designer.cs
generated
Normal file
3508
RMuseum/Migrations/20211208162642_RecitationErrors.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
56
RMuseum/Migrations/20211208162642_RecitationErrors.cs
Normal file
56
RMuseum/Migrations/20211208162642_RecitationErrors.cs
Normal file
@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace RMuseum.Migrations
|
||||
{
|
||||
public partial class RecitationErrors : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RecitationErrorReports",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
RecitationId = table.Column<int>(type: "int", nullable: false),
|
||||
ReasonText = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ReporterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RecitationErrorReports", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_RecitationErrorReports_AspNetUsers_ReporterId",
|
||||
column: x => x.ReporterId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_RecitationErrorReports_Recitations_RecitationId",
|
||||
column: x => x.RecitationId,
|
||||
principalTable: "Recitations",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RecitationErrorReports_RecitationId",
|
||||
table: "RecitationErrorReports",
|
||||
column: "RecitationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RecitationErrorReports_ReporterId",
|
||||
table: "RecitationErrorReports",
|
||||
column: "ReporterId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "RecitationErrorReports");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1520,6 +1520,35 @@ namespace RMuseum.Migrations
|
||||
b.ToTable("Recitations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.GanjoorAudio.RecitationErrorReport", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("ReasonText")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("RecitationId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("ReporterId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RecitationId");
|
||||
|
||||
b.HasIndex("ReporterId");
|
||||
|
||||
b.ToTable("RecitationErrorReports");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.GanjoorAudio.RecitationPublishingTracker", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@ -3103,6 +3132,23 @@ namespace RMuseum.Migrations
|
||||
b.Navigation("Reviewer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.GanjoorAudio.RecitationErrorReport", b =>
|
||||
{
|
||||
b.HasOne("RMuseum.Models.GanjoorAudio.Recitation", "Recitation")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecitationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "Reporter")
|
||||
.WithMany()
|
||||
.HasForeignKey("ReporterId");
|
||||
|
||||
b.Navigation("Recitation");
|
||||
|
||||
b.Navigation("Reporter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.GanjoorAudio.RecitationPublishingTracker", b =>
|
||||
{
|
||||
b.HasOne("RMuseum.Models.GanjoorAudio.Recitation", "PoemNarration")
|
||||
|
||||
@ -31,12 +31,12 @@ namespace RMuseum.Models.GanjoorAudio
|
||||
/// <summary>
|
||||
/// Reporter User Id
|
||||
/// </summary>
|
||||
public Guid ReporterId { get; set; }
|
||||
public Guid? ReporterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reporter User
|
||||
/// </summary>
|
||||
public RAppUser Reporter { get; set; }
|
||||
public virtual RAppUser Reporter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// DateTime
|
||||
|
||||
@ -2234,6 +2234,11 @@
|
||||
Reported User Notes
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:RMuseum.DbContext.RMuseumDbContext.RecitationErrorReports">
|
||||
<summary>
|
||||
recitation error reports
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:RMuseum.Models.Accounting.DonationExpenditure">
|
||||
<summary>
|
||||
donation expenditures
|
||||
|
||||
Loading…
Reference in New Issue
Block a user