Compare commits
No commits in common. "4ae6ea799f1e7223c05a1e613368d37535c0b9d3" and "d51f570841a460cdcb906f26f08c13c050e524c1" have entirely different histories.
4ae6ea799f
...
d51f570841
1
.gitignore
vendored
1
.gitignore
vendored
@ -398,4 +398,3 @@ FodyWeavers.xsd
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
/CarpentryWorkshop/ImplementationExtensions
|
||||
|
@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(CarpentryWorkshopDatabase))]
|
||||
[Migration("20240522074840_InitialCreate")]
|
||||
[Migration("20240313050649_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@ -78,59 +78,6 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
b.ToTable("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Shop", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateOpen")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("ShopName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("WoodMaxCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Shops");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.ShopWood", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ShopId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WoodId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ShopId");
|
||||
|
||||
b.HasIndex("WoodId");
|
||||
|
||||
b.ToTable("ShopWoods");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Wood", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -188,25 +135,6 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
b.Navigation("Wood");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.ShopWood", b =>
|
||||
{
|
||||
b.HasOne("CarpentryWorkshopDatabaseImplement.Models.Shop", "Shop")
|
||||
.WithMany("Woods")
|
||||
.HasForeignKey("ShopId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("CarpentryWorkshopDatabaseImplement.Models.Wood", "Wood")
|
||||
.WithMany("ShopWoods")
|
||||
.HasForeignKey("WoodId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Shop");
|
||||
|
||||
b.Navigation("Wood");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.WoodComponent", b =>
|
||||
{
|
||||
b.HasOne("CarpentryWorkshopDatabaseImplement.Models.Component", "Component")
|
||||
@ -231,18 +159,11 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
b.Navigation("WoodComponents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Shop", b =>
|
||||
{
|
||||
b.Navigation("Woods");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Wood", b =>
|
||||
{
|
||||
b.Navigation("Components");
|
||||
|
||||
b.Navigation("Orders");
|
||||
|
||||
b.Navigation("ShopWoods");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
@ -25,22 +25,6 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
table.PrimaryKey("PK_Components", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Shops",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ShopName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Address = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
DateOpen = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
WoodMaxCount = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Shops", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Woods",
|
||||
columns: table => new
|
||||
@ -79,33 +63,6 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ShopWoods",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WoodId = table.Column<int>(type: "int", nullable: false),
|
||||
ShopId = table.Column<int>(type: "int", nullable: false),
|
||||
Count = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ShopWoods", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ShopWoods_Shops_ShopId",
|
||||
column: x => x.ShopId,
|
||||
principalTable: "Shops",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ShopWoods_Woods_WoodId",
|
||||
column: x => x.WoodId,
|
||||
principalTable: "Woods",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WoodComponents",
|
||||
columns: table => new
|
||||
@ -138,16 +95,6 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
table: "Orders",
|
||||
column: "WoodId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ShopWoods_ShopId",
|
||||
table: "ShopWoods",
|
||||
column: "ShopId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ShopWoods_WoodId",
|
||||
table: "ShopWoods",
|
||||
column: "WoodId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_WoodComponents_ComponentId",
|
||||
table: "WoodComponents",
|
||||
@ -165,15 +112,9 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "Orders");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ShopWoods");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WoodComponents");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Shops");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Components");
|
||||
|
@ -75,59 +75,6 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
b.ToTable("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Shop", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateOpen")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("ShopName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("WoodMaxCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Shops");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.ShopWood", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ShopId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WoodId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ShopId");
|
||||
|
||||
b.HasIndex("WoodId");
|
||||
|
||||
b.ToTable("ShopWoods");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Wood", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -185,25 +132,6 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
b.Navigation("Wood");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.ShopWood", b =>
|
||||
{
|
||||
b.HasOne("CarpentryWorkshopDatabaseImplement.Models.Shop", "Shop")
|
||||
.WithMany("Woods")
|
||||
.HasForeignKey("ShopId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("CarpentryWorkshopDatabaseImplement.Models.Wood", "Wood")
|
||||
.WithMany("ShopWoods")
|
||||
.HasForeignKey("WoodId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Shop");
|
||||
|
||||
b.Navigation("Wood");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.WoodComponent", b =>
|
||||
{
|
||||
b.HasOne("CarpentryWorkshopDatabaseImplement.Models.Component", "Component")
|
||||
@ -228,18 +156,11 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
|
||||
b.Navigation("WoodComponents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Shop", b =>
|
||||
{
|
||||
b.Navigation("Woods");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Wood", b =>
|
||||
{
|
||||
b.Navigation("Components");
|
||||
|
||||
b.Navigation("Orders");
|
||||
|
||||
b.Navigation("ShopWoods");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user