You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
3.5 KiB
116 lines
3.5 KiB
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using StubbedContextLib;
|
|
|
|
#nullable disable
|
|
|
|
namespace StubbedContextLib.Migrations
|
|
{
|
|
[DbContext(typeof(StubbedContext))]
|
|
[Migration("20240215122943_Mg")]
|
|
partial class Mg
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.1");
|
|
|
|
modelBuilder.Entity("Entities.BookEntity", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Author")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Isbn")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int?>("OwnerId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("PersonId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("OwnerId");
|
|
|
|
b.ToTable("BookEntity");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = 1L,
|
|
Author = "test",
|
|
Isbn = "test",
|
|
PersonId = 1,
|
|
Title = "test"
|
|
},
|
|
new
|
|
{
|
|
Id = 2L,
|
|
Author = "test2",
|
|
Isbn = "test2",
|
|
PersonId = 1,
|
|
Title = "test2"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.PersonEntity", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("FirstName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("LastName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("PersonEntity");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = 1,
|
|
FirstName = "coco",
|
|
LastName = "test"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.BookEntity", b =>
|
|
{
|
|
b.HasOne("Entities.PersonEntity", "Owner")
|
|
.WithMany("Books")
|
|
.HasForeignKey("OwnerId");
|
|
|
|
b.Navigation("Owner");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.PersonEntity", b =>
|
|
{
|
|
b.Navigation("Books");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|