refactor: properly rename connections-related tables; top-level namespaces
This commit is contained in:
136
Database/Migrations/20241226124356_RenameTablesCorrectly.Designer.cs
generated
Normal file
136
Database/Migrations/20241226124356_RenameTablesCorrectly.Designer.cs
generated
Normal file
@@ -0,0 +1,136 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using ConnectionsAPI.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ConnectionsAPI.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(ConnectionsContext))]
|
||||
[Migration("20241226124356_RenameTablesCorrectly")]
|
||||
partial class RenameTablesCorrectly
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.4");
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCard", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("CategoriesCategoryId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CategoryId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Position")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CategoryId");
|
||||
|
||||
b.ToTable("ConnectionsCard");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCategory", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Color")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ConnectionsPuzzleId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ConnectionsPuzzleId");
|
||||
|
||||
b.ToTable("ConnectionsCategory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsPuzzle", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("ContentMD5")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("CreatedDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EditorName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Index")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("PrintDate")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PrintDate")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("CategoriesPuzzles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCard", b =>
|
||||
{
|
||||
b.HasOne("ConnectionsAPI.Database.Entities.ConnectionsCategory", "Category")
|
||||
.WithMany("Cards")
|
||||
.HasForeignKey("CategoryId");
|
||||
|
||||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCategory", b =>
|
||||
{
|
||||
b.HasOne("ConnectionsAPI.Database.Entities.ConnectionsPuzzle", "ConnectionsPuzzle")
|
||||
.WithMany("Categories")
|
||||
.HasForeignKey("ConnectionsPuzzleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ConnectionsPuzzle");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCategory", b =>
|
||||
{
|
||||
b.Navigation("Cards");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsPuzzle", b =>
|
||||
{
|
||||
b.Navigation("Categories");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
134
Database/Migrations/20241226124356_RenameTablesCorrectly.cs
Normal file
134
Database/Migrations/20241226124356_RenameTablesCorrectly.cs
Normal file
@@ -0,0 +1,134 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ConnectionsAPI.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RenameTablesCorrectly : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CategoriesCard");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CategoriesCategory");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ConnectionsCategory",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Color = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ConnectionsPuzzleId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ConnectionsCategory", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ConnectionsCategory_CategoriesPuzzles_ConnectionsPuzzleId",
|
||||
column: x => x.ConnectionsPuzzleId,
|
||||
principalTable: "CategoriesPuzzles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ConnectionsCard",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Content = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Position = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
CategoriesCategoryId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
CategoryId = table.Column<int>(type: "INTEGER", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ConnectionsCard", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ConnectionsCard_ConnectionsCategory_CategoryId",
|
||||
column: x => x.CategoryId,
|
||||
principalTable: "ConnectionsCategory",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ConnectionsCard_CategoryId",
|
||||
table: "ConnectionsCard",
|
||||
column: "CategoryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ConnectionsCategory_ConnectionsPuzzleId",
|
||||
table: "ConnectionsCategory",
|
||||
column: "ConnectionsPuzzleId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ConnectionsCard");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ConnectionsCategory");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CategoriesCategory",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
CategoriesPuzzleId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Color = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CategoriesCategory", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CategoriesCategory_CategoriesPuzzles_CategoriesPuzzleId",
|
||||
column: x => x.CategoriesPuzzleId,
|
||||
principalTable: "CategoriesPuzzles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CategoriesCard",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
CategoriesCategoryId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Content = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Position = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CategoriesCard", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CategoriesCard_CategoriesCategory_CategoriesCategoryId",
|
||||
column: x => x.CategoriesCategoryId,
|
||||
principalTable: "CategoriesCategory",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CategoriesCard_CategoriesCategoryId",
|
||||
table: "CategoriesCard",
|
||||
column: "CategoriesCategoryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CategoriesCategory_CategoriesPuzzleId",
|
||||
table: "CategoriesCategory",
|
||||
column: "CategoriesPuzzleId");
|
||||
}
|
||||
}
|
||||
}
|
||||
136
Database/Migrations/20241226124529_RenameCollectionsTable.Designer.cs
generated
Normal file
136
Database/Migrations/20241226124529_RenameCollectionsTable.Designer.cs
generated
Normal file
@@ -0,0 +1,136 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using ConnectionsAPI.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ConnectionsAPI.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(ConnectionsContext))]
|
||||
[Migration("20241226124529_RenameCollectionsTable")]
|
||||
partial class RenameCollectionsTable
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.4");
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCard", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("CategoriesCategoryId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CategoryId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Position")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CategoryId");
|
||||
|
||||
b.ToTable("ConnectionsCard");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCategory", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Color")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ConnectionsPuzzleId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ConnectionsPuzzleId");
|
||||
|
||||
b.ToTable("ConnectionsCategory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsPuzzle", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("ContentMD5")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("CreatedDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EditorName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Index")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("PrintDate")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PrintDate")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("ConnectionsPuzzles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCard", b =>
|
||||
{
|
||||
b.HasOne("ConnectionsAPI.Database.Entities.ConnectionsCategory", "Category")
|
||||
.WithMany("Cards")
|
||||
.HasForeignKey("CategoryId");
|
||||
|
||||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCategory", b =>
|
||||
{
|
||||
b.HasOne("ConnectionsAPI.Database.Entities.ConnectionsPuzzle", "ConnectionsPuzzle")
|
||||
.WithMany("Categories")
|
||||
.HasForeignKey("ConnectionsPuzzleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ConnectionsPuzzle");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCategory", b =>
|
||||
{
|
||||
b.Navigation("Cards");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsPuzzle", b =>
|
||||
{
|
||||
b.Navigation("Categories");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
78
Database/Migrations/20241226124529_RenameCollectionsTable.cs
Normal file
78
Database/Migrations/20241226124529_RenameCollectionsTable.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ConnectionsAPI.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RenameCollectionsTable : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ConnectionsCategory_CategoriesPuzzles_ConnectionsPuzzleId",
|
||||
table: "ConnectionsCategory");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_CategoriesPuzzles",
|
||||
table: "CategoriesPuzzles");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "CategoriesPuzzles",
|
||||
newName: "ConnectionsPuzzles");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_CategoriesPuzzles_PrintDate",
|
||||
table: "ConnectionsPuzzles",
|
||||
newName: "IX_ConnectionsPuzzles_PrintDate");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ConnectionsPuzzles",
|
||||
table: "ConnectionsPuzzles",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ConnectionsCategory_ConnectionsPuzzles_ConnectionsPuzzleId",
|
||||
table: "ConnectionsCategory",
|
||||
column: "ConnectionsPuzzleId",
|
||||
principalTable: "ConnectionsPuzzles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ConnectionsCategory_ConnectionsPuzzles_ConnectionsPuzzleId",
|
||||
table: "ConnectionsCategory");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ConnectionsPuzzles",
|
||||
table: "ConnectionsPuzzles");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ConnectionsPuzzles",
|
||||
newName: "CategoriesPuzzles");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ConnectionsPuzzles_PrintDate",
|
||||
table: "CategoriesPuzzles",
|
||||
newName: "IX_CategoriesPuzzles_PrintDate");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_CategoriesPuzzles",
|
||||
table: "CategoriesPuzzles",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ConnectionsCategory_CategoriesPuzzles_ConnectionsPuzzleId",
|
||||
table: "ConnectionsCategory",
|
||||
column: "ConnectionsPuzzleId",
|
||||
principalTable: "CategoriesPuzzles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace ConnectionsAPI.Database.Migrations
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.4");
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCard", b =>
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCard", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -26,6 +26,9 @@ namespace ConnectionsAPI.Database.Migrations
|
||||
b.Property<int>("CategoriesCategoryId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CategoryId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
@@ -35,21 +38,21 @@ namespace ConnectionsAPI.Database.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CategoriesCategoryId");
|
||||
b.HasIndex("CategoryId");
|
||||
|
||||
b.ToTable("CategoriesCard");
|
||||
b.ToTable("ConnectionsCard");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCategory", b =>
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCategory", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("CategoriesPuzzleId")
|
||||
b.Property<int>("Color")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Color")
|
||||
b.Property<int>("ConnectionsPuzzleId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
@@ -58,12 +61,12 @@ namespace ConnectionsAPI.Database.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CategoriesPuzzleId");
|
||||
b.HasIndex("ConnectionsPuzzleId");
|
||||
|
||||
b.ToTable("CategoriesCategory");
|
||||
b.ToTable("ConnectionsCategory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesPuzzle", b =>
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsPuzzle", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -92,37 +95,35 @@ namespace ConnectionsAPI.Database.Migrations
|
||||
b.HasIndex("PrintDate")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("CategoriesPuzzles");
|
||||
b.ToTable("ConnectionsPuzzles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCard", b =>
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCard", b =>
|
||||
{
|
||||
b.HasOne("ConnectionsAPI.Database.Entities.CategoriesCategory", "Category")
|
||||
.WithMany("CategoriesPuzzleCards")
|
||||
.HasForeignKey("CategoriesCategoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
b.HasOne("ConnectionsAPI.Database.Entities.ConnectionsCategory", "Category")
|
||||
.WithMany("Cards")
|
||||
.HasForeignKey("CategoryId");
|
||||
|
||||
b.Navigation("Category");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCategory", b =>
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCategory", b =>
|
||||
{
|
||||
b.HasOne("ConnectionsAPI.Database.Entities.CategoriesPuzzle", "CategoriesPuzzle")
|
||||
b.HasOne("ConnectionsAPI.Database.Entities.ConnectionsPuzzle", "ConnectionsPuzzle")
|
||||
.WithMany("Categories")
|
||||
.HasForeignKey("CategoriesPuzzleId")
|
||||
.HasForeignKey("ConnectionsPuzzleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CategoriesPuzzle");
|
||||
b.Navigation("ConnectionsPuzzle");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesCategory", b =>
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsCategory", b =>
|
||||
{
|
||||
b.Navigation("CategoriesPuzzleCards");
|
||||
b.Navigation("Cards");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.CategoriesPuzzle", b =>
|
||||
modelBuilder.Entity("ConnectionsAPI.Database.Entities.ConnectionsPuzzle", b =>
|
||||
{
|
||||
b.Navigation("Categories");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user