Redid the migration order to align with person migrations.
This commit is contained in:
parent
4073ffef66
commit
9893c9f473
4 changed files with 141 additions and 72 deletions
|
|
@ -11,14 +11,14 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
namespace API.Data.Migrations
|
namespace API.Data.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(DataContext))]
|
[DbContext(typeof(DataContext))]
|
||||||
[Migration("20240914041512_KoreaderHash")]
|
[Migration("20241026114311_KoreaderHash")]
|
||||||
partial class KoreaderHash
|
partial class KoreaderHash
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.10");
|
||||||
|
|
||||||
modelBuilder.Entity("API.Entities.AppRole", b =>
|
modelBuilder.Entity("API.Entities.AppRole", b =>
|
||||||
{
|
{
|
||||||
|
|
@ -734,8 +734,8 @@ namespace API.Data.Migrations
|
||||||
b.Property<string>("AlternateSeries")
|
b.Property<string>("AlternateSeries")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<int>("AvgHoursToRead")
|
b.Property<float>("AvgHoursToRead")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("REAL");
|
||||||
|
|
||||||
b.Property<bool>("CharacterLocked")
|
b.Property<bool>("CharacterLocked")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
@ -904,6 +904,24 @@ namespace API.Data.Migrations
|
||||||
b.ToTable("Chapter");
|
b.ToTable("Chapter");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("API.Entities.ChapterPeople", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("ChapterId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("PersonId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("Role")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.HasKey("ChapterId", "PersonId", "Role");
|
||||||
|
|
||||||
|
b.HasIndex("PersonId");
|
||||||
|
|
||||||
|
b.ToTable("ChapterPeople");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("API.Entities.CollectionTag", b =>
|
modelBuilder.Entity("API.Entities.CollectionTag", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
|
|
@ -1537,14 +1555,38 @@ namespace API.Data.Migrations
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("AniListId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("Asin")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("CoverImage")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<bool>("CoverImageLocked")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("HardcoverId")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<long>("MalId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
b.Property<string>("NormalizedName")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<int>("Role")
|
b.Property<string>("PrimaryColor")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("SecondaryColor")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -1815,8 +1857,8 @@ namespace API.Data.Migrations
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<int>("AvgHoursToRead")
|
b.Property<float>("AvgHoursToRead")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("REAL");
|
||||||
|
|
||||||
b.Property<string>("CoverImage")
|
b.Property<string>("CoverImage")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
@ -1909,6 +1951,24 @@ namespace API.Data.Migrations
|
||||||
b.ToTable("Series");
|
b.ToTable("Series");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("API.Entities.SeriesMetadataPeople", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("SeriesMetadataId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("PersonId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("Role")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.HasKey("SeriesMetadataId", "PersonId", "Role");
|
||||||
|
|
||||||
|
b.HasIndex("PersonId");
|
||||||
|
|
||||||
|
b.ToTable("SeriesMetadataPeople");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("API.Entities.ServerSetting", b =>
|
modelBuilder.Entity("API.Entities.ServerSetting", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Key")
|
b.Property<int>("Key")
|
||||||
|
|
@ -2046,8 +2106,8 @@ namespace API.Data.Migrations
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<int>("AvgHoursToRead")
|
b.Property<float>("AvgHoursToRead")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("REAL");
|
||||||
|
|
||||||
b.Property<string>("CoverImage")
|
b.Property<string>("CoverImage")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
@ -2155,21 +2215,6 @@ namespace API.Data.Migrations
|
||||||
b.ToTable("ChapterGenre");
|
b.ToTable("ChapterGenre");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ChapterPerson", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("ChapterMetadatasId")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.Property<int>("PeopleId")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("ChapterMetadatasId", "PeopleId");
|
|
||||||
|
|
||||||
b.HasIndex("PeopleId");
|
|
||||||
|
|
||||||
b.ToTable("ChapterPerson");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ChapterTag", b =>
|
modelBuilder.Entity("ChapterTag", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("ChaptersId")
|
b.Property<int>("ChaptersId")
|
||||||
|
|
@ -2344,21 +2389,6 @@ namespace API.Data.Migrations
|
||||||
b.ToTable("AspNetUserTokens", (string)null);
|
b.ToTable("AspNetUserTokens", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PersonSeriesMetadata", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("PeopleId")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.Property<int>("SeriesMetadatasId")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("PeopleId", "SeriesMetadatasId");
|
|
||||||
|
|
||||||
b.HasIndex("SeriesMetadatasId");
|
|
||||||
|
|
||||||
b.ToTable("PersonSeriesMetadata");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("SeriesMetadataTag", b =>
|
modelBuilder.Entity("SeriesMetadataTag", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("SeriesMetadatasId")
|
b.Property<int>("SeriesMetadatasId")
|
||||||
|
|
@ -2606,6 +2636,25 @@ namespace API.Data.Migrations
|
||||||
b.Navigation("Volume");
|
b.Navigation("Volume");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("API.Entities.ChapterPeople", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("API.Entities.Chapter", "Chapter")
|
||||||
|
.WithMany("People")
|
||||||
|
.HasForeignKey("ChapterId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("API.Entities.Person", "Person")
|
||||||
|
.WithMany("ChapterPeople")
|
||||||
|
.HasForeignKey("PersonId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Chapter");
|
||||||
|
|
||||||
|
b.Navigation("Person");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("API.Entities.Device", b =>
|
modelBuilder.Entity("API.Entities.Device", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("API.Entities.AppUser", "AppUser")
|
b.HasOne("API.Entities.AppUser", "AppUser")
|
||||||
|
|
@ -2833,6 +2882,25 @@ namespace API.Data.Migrations
|
||||||
b.Navigation("Library");
|
b.Navigation("Library");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("API.Entities.SeriesMetadataPeople", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("API.Entities.Person", "Person")
|
||||||
|
.WithMany("SeriesMetadataPeople")
|
||||||
|
.HasForeignKey("PersonId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("API.Entities.Metadata.SeriesMetadata", "SeriesMetadata")
|
||||||
|
.WithMany("People")
|
||||||
|
.HasForeignKey("SeriesMetadataId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Person");
|
||||||
|
|
||||||
|
b.Navigation("SeriesMetadata");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("API.Entities.Volume", b =>
|
modelBuilder.Entity("API.Entities.Volume", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("API.Entities.Series", "Series")
|
b.HasOne("API.Entities.Series", "Series")
|
||||||
|
|
@ -2889,21 +2957,6 @@ namespace API.Data.Migrations
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ChapterPerson", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("API.Entities.Chapter", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("ChapterMetadatasId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("API.Entities.Person", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("PeopleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ChapterTag", b =>
|
modelBuilder.Entity("ChapterTag", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("API.Entities.Chapter", null)
|
b.HasOne("API.Entities.Chapter", null)
|
||||||
|
|
@ -3030,21 +3083,6 @@ namespace API.Data.Migrations
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PersonSeriesMetadata", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("API.Entities.Person", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("PeopleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("API.Entities.Metadata.SeriesMetadata", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("SeriesMetadatasId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("SeriesMetadataTag", b =>
|
modelBuilder.Entity("SeriesMetadataTag", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("API.Entities.Metadata.SeriesMetadata", null)
|
b.HasOne("API.Entities.Metadata.SeriesMetadata", null)
|
||||||
|
|
@ -3102,6 +3140,8 @@ namespace API.Data.Migrations
|
||||||
{
|
{
|
||||||
b.Navigation("Files");
|
b.Navigation("Files");
|
||||||
|
|
||||||
|
b.Navigation("People");
|
||||||
|
|
||||||
b.Navigation("UserProgress");
|
b.Navigation("UserProgress");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -3116,6 +3156,18 @@ namespace API.Data.Migrations
|
||||||
b.Navigation("Series");
|
b.Navigation("Series");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("API.Entities.Metadata.SeriesMetadata", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("People");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("API.Entities.Person", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("ChapterPeople");
|
||||||
|
|
||||||
|
b.Navigation("SeriesMetadataPeople");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("API.Entities.ReadingList", b =>
|
modelBuilder.Entity("API.Entities.ReadingList", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Items");
|
b.Navigation("Items");
|
||||||
|
|
@ -15,7 +15,7 @@ namespace API.Data.Migrations
|
||||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.10");
|
||||||
|
|
||||||
modelBuilder.Entity("API.Entities.AppRole", b =>
|
modelBuilder.Entity("API.Entities.AppRole", b =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
19
openapi.json
19
openapi.json
|
|
@ -2937,7 +2937,24 @@
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK"
|
"description": "OK",
|
||||||
|
"content": {
|
||||||
|
"text/plain": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderBookDto"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderBookDto"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"text/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/KoreaderBookDto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue