docs: #352 poem geo date tags db migration
This commit is contained in:
parent
eba5e0bc1b
commit
ac8b141363
4407
RMuseum/Migrations/20220801181711_PoemGeoDateTagFields.Designer.cs
generated
Normal file
4407
RMuseum/Migrations/20220801181711_PoemGeoDateTagFields.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
58
RMuseum/Migrations/20220801181711_PoemGeoDateTagFields.cs
Normal file
58
RMuseum/Migrations/20220801181711_PoemGeoDateTagFields.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace RMuseum.Migrations
|
||||
{
|
||||
public partial class PoemGeoDateTagFields : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PoemGeoDateTags",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
PoemId = table.Column<int>(type: "int", nullable: false),
|
||||
CoupletIndex = table.Column<int>(type: "int", nullable: false),
|
||||
LocationId = table.Column<int>(type: "int", nullable: true),
|
||||
LunarYear = table.Column<int>(type: "int", nullable: true),
|
||||
LunarMonth = table.Column<int>(type: "int", nullable: true),
|
||||
LunarDay = table.Column<int>(type: "int", nullable: true),
|
||||
LunarDateTotalNumber = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PoemGeoDateTags", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PoemGeoDateTags_GanjoorGeoLocations_LocationId",
|
||||
column: x => x.LocationId,
|
||||
principalTable: "GanjoorGeoLocations",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_PoemGeoDateTags_GanjoorPoems_PoemId",
|
||||
column: x => x.PoemId,
|
||||
principalTable: "GanjoorPoems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PoemGeoDateTags_LocationId",
|
||||
table: "PoemGeoDateTags",
|
||||
column: "LocationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PoemGeoDateTags_PoemId",
|
||||
table: "PoemGeoDateTags",
|
||||
column: "PoemId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PoemGeoDateTags");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1920,6 +1920,44 @@ namespace RMuseum.Migrations
|
||||
b.ToTable("GanjoorVerseVOrderText");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.Ganjoor.PoemGeoDateTag", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<int>("CoupletIndex")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("LocationId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("LunarDateTotalNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("LunarDay")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("LunarMonth")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("LunarYear")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("PoemId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LocationId");
|
||||
|
||||
b.HasIndex("PoemId");
|
||||
|
||||
b.ToTable("PoemGeoDateTags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.Ganjoor.PoemMusicTrack", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -3896,6 +3934,23 @@ namespace RMuseum.Migrations
|
||||
.HasForeignKey("GanjoorPoemCorrectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.Ganjoor.PoemGeoDateTag", b =>
|
||||
{
|
||||
b.HasOne("RMuseum.Models.Ganjoor.GanjoorGeoLocation", "Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("RMuseum.Models.Ganjoor.GanjoorPoem", "Poem")
|
||||
.WithMany()
|
||||
.HasForeignKey("PoemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Location");
|
||||
|
||||
b.Navigation("Poem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RMuseum.Models.Ganjoor.PoemMusicTrack", b =>
|
||||
{
|
||||
b.HasOne("RMuseum.Models.MusicCatalogue.GanjoorTrack", "GanjoorTrack")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user