Работа над импортом заклинаний
This commit is contained in:
+102
-10
@@ -13,7 +13,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Migrations
|
||||
{
|
||||
[DbContext(typeof(Pf2eDbContext))]
|
||||
[Migration("20250428065903_1")]
|
||||
[Migration("20250505114131_1")]
|
||||
partial class _1
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -417,8 +417,7 @@ namespace Pf2eModel.Migrations
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)")
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("name")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
@@ -873,16 +872,10 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnName("class_id")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)")
|
||||
.HasColumnName("name")
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.Property<TrainingStage>("Stage")
|
||||
.HasColumnType("training_stage")
|
||||
.HasColumnName("stage")
|
||||
.HasColumnOrder(5);
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.Property<int?>("TrainingId")
|
||||
.HasColumnType("integer")
|
||||
@@ -901,6 +894,62 @@ namespace Pf2eModel.Migrations
|
||||
b.ToTable("class_trainings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.SubclassProvidedEntities", b =>
|
||||
{
|
||||
b.Property<int>("SubclassId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("subclass_id");
|
||||
|
||||
b.Property<int>("EntityId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("entity_id");
|
||||
|
||||
b.HasKey("SubclassId", "EntityId")
|
||||
.HasName("pk_subclass_provided_entities");
|
||||
|
||||
b.HasIndex("EntityId")
|
||||
.HasDatabaseName("ix_subclass_provided_entities_entity_id");
|
||||
|
||||
b.ToTable("subclass_provided_entities", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.SubclassTrainings", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<TrainingStage>("Stage")
|
||||
.HasColumnType("training_stage")
|
||||
.HasColumnName("stage")
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.Property<int>("SubclassId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("subclass_id")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<int>("TrainingId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("training_id")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_subclass_trainings");
|
||||
|
||||
b.HasIndex("SubclassId")
|
||||
.HasDatabaseName("ix_subclass_trainings_subclass_id");
|
||||
|
||||
b.HasIndex("TrainingId")
|
||||
.HasDatabaseName("ix_subclass_trainings_training_id");
|
||||
|
||||
b.ToTable("subclass_trainings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Condition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1870,6 +1919,44 @@ namespace Pf2eModel.Migrations
|
||||
b.Navigation("Training");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.SubclassProvidedEntities", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("EntityId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_subclass_provided_entities_entities_entity_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Structure.Subclass", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("SubclassId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_subclass_provided_entities_subclasses_subclass_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.SubclassTrainings", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Structure.Subclass", "Subclass")
|
||||
.WithMany("Trainings")
|
||||
.HasForeignKey("SubclassId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_subclass_trainings_subclasses_subclass_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Common.Training", "Training")
|
||||
.WithMany()
|
||||
.HasForeignKey("TrainingId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_subclass_trainings_trainings_training_id");
|
||||
|
||||
b.Navigation("Subclass");
|
||||
|
||||
b.Navigation("Training");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Condition", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
@@ -2198,6 +2285,11 @@ namespace Pf2eModel.Migrations
|
||||
b.Navigation("SpellRitual");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Subclass", b =>
|
||||
{
|
||||
b.Navigation("Trainings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.SubclassGroup", b =>
|
||||
{
|
||||
b.Navigation("Subclasses");
|
||||
+78
-7
@@ -120,7 +120,7 @@ namespace Pf2eModel.Migrations
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
name = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
|
||||
name = table.Column<string>(type: "jsonb", nullable: false),
|
||||
type = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
@@ -633,7 +633,6 @@ namespace Pf2eModel.Migrations
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
class_id = table.Column<int>(type: "integer", nullable: false),
|
||||
training_id = table.Column<int>(type: "integer", nullable: true),
|
||||
name = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
|
||||
stage = table.Column<TrainingStage>(type: "training_stage", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
@@ -1020,6 +1019,57 @@ namespace Pf2eModel.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "subclass_provided_entities",
|
||||
columns: table => new
|
||||
{
|
||||
subclass_id = table.Column<int>(type: "integer", nullable: false),
|
||||
entity_id = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_subclass_provided_entities", x => new { x.subclass_id, x.entity_id });
|
||||
table.ForeignKey(
|
||||
name: "fk_subclass_provided_entities_entities_entity_id",
|
||||
column: x => x.entity_id,
|
||||
principalTable: "entities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "fk_subclass_provided_entities_subclasses_subclass_id",
|
||||
column: x => x.subclass_id,
|
||||
principalTable: "subclasses",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "subclass_trainings",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
subclass_id = table.Column<int>(type: "integer", nullable: false),
|
||||
training_id = table.Column<int>(type: "integer", nullable: false),
|
||||
stage = table.Column<TrainingStage>(type: "training_stage", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_subclass_trainings", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_subclass_trainings_subclasses_subclass_id",
|
||||
column: x => x.subclass_id,
|
||||
principalTable: "subclasses",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "fk_subclass_trainings_trainings_training_id",
|
||||
column: x => x.training_id,
|
||||
principalTable: "trainings",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_ancestry_boosts_ancestry_id",
|
||||
table: "ancestry_boosts",
|
||||
@@ -1171,6 +1221,21 @@ namespace Pf2eModel.Migrations
|
||||
table: "subclass_groups",
|
||||
column: "class_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_subclass_provided_entities_entity_id",
|
||||
table: "subclass_provided_entities",
|
||||
column: "entity_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_subclass_trainings_subclass_id",
|
||||
table: "subclass_trainings",
|
||||
column: "subclass_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_subclass_trainings_training_id",
|
||||
table: "subclass_trainings",
|
||||
column: "training_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_subclasses_group_id",
|
||||
table: "subclasses",
|
||||
@@ -1268,7 +1333,10 @@ namespace Pf2eModel.Migrations
|
||||
name: "spell_rituals");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "subclasses");
|
||||
name: "subclass_provided_entities");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "subclass_trainings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "languages");
|
||||
@@ -1279,9 +1347,6 @@ namespace Pf2eModel.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "backgrounds");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "trainings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "deities");
|
||||
|
||||
@@ -1304,11 +1369,17 @@ namespace Pf2eModel.Migrations
|
||||
name: "spells");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "subclass_groups");
|
||||
name: "subclasses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "trainings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "feats");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "subclass_groups");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "classes");
|
||||
|
||||
@@ -414,8 +414,7 @@ namespace Pf2eModel.Migrations
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)")
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("name")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
@@ -870,16 +869,10 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnName("class_id")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)")
|
||||
.HasColumnName("name")
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.Property<TrainingStage>("Stage")
|
||||
.HasColumnType("training_stage")
|
||||
.HasColumnName("stage")
|
||||
.HasColumnOrder(5);
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.Property<int?>("TrainingId")
|
||||
.HasColumnType("integer")
|
||||
@@ -898,6 +891,62 @@ namespace Pf2eModel.Migrations
|
||||
b.ToTable("class_trainings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.SubclassProvidedEntities", b =>
|
||||
{
|
||||
b.Property<int>("SubclassId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("subclass_id");
|
||||
|
||||
b.Property<int>("EntityId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("entity_id");
|
||||
|
||||
b.HasKey("SubclassId", "EntityId")
|
||||
.HasName("pk_subclass_provided_entities");
|
||||
|
||||
b.HasIndex("EntityId")
|
||||
.HasDatabaseName("ix_subclass_provided_entities_entity_id");
|
||||
|
||||
b.ToTable("subclass_provided_entities", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.SubclassTrainings", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<TrainingStage>("Stage")
|
||||
.HasColumnType("training_stage")
|
||||
.HasColumnName("stage")
|
||||
.HasColumnOrder(4);
|
||||
|
||||
b.Property<int>("SubclassId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("subclass_id")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<int>("TrainingId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("training_id")
|
||||
.HasColumnOrder(3);
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_subclass_trainings");
|
||||
|
||||
b.HasIndex("SubclassId")
|
||||
.HasDatabaseName("ix_subclass_trainings_subclass_id");
|
||||
|
||||
b.HasIndex("TrainingId")
|
||||
.HasDatabaseName("ix_subclass_trainings_training_id");
|
||||
|
||||
b.ToTable("subclass_trainings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Condition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1867,6 +1916,44 @@ namespace Pf2eModel.Migrations
|
||||
b.Navigation("Training");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.SubclassProvidedEntities", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("EntityId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_subclass_provided_entities_entities_entity_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Structure.Subclass", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("SubclassId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_subclass_provided_entities_subclasses_subclass_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ClassRelation.SubclassTrainings", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Structure.Subclass", "Subclass")
|
||||
.WithMany("Trainings")
|
||||
.HasForeignKey("SubclassId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_subclass_trainings_subclasses_subclass_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Common.Training", "Training")
|
||||
.WithMany()
|
||||
.HasForeignKey("TrainingId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_subclass_trainings_trainings_training_id");
|
||||
|
||||
b.Navigation("Subclass");
|
||||
|
||||
b.Navigation("Training");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Condition", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
@@ -2195,6 +2282,11 @@ namespace Pf2eModel.Migrations
|
||||
b.Navigation("SpellRitual");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Subclass", b =>
|
||||
{
|
||||
b.Navigation("Trainings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.SubclassGroup", b =>
|
||||
{
|
||||
b.Navigation("Subclasses");
|
||||
|
||||
Reference in New Issue
Block a user