Продолжение
This commit is contained in:
+47
-34
@@ -13,7 +13,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Migrations
|
||||
{
|
||||
[DbContext(typeof(Pf2eDbContext))]
|
||||
[Migration("20250420145024_1")]
|
||||
[Migration("20250421123520_1")]
|
||||
partial class _1
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -24,7 +24,7 @@ namespace Pf2eModel.Migrations
|
||||
.HasAnnotation("ProductVersion", "9.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "unknown", "offensive", "defensive", "interaction", "familiar", "army_tactic", "army_war_action", "kingdom_activity", "kingdom_feat", "kingdom_feature" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "unknown", "archetype", "class-feature", "class-feat", "offensive", "defensive", "interaction", "familiar", "army_tactic", "army_war_action", "kingdom_activity", "kingdom_feat", "kingdom_feature" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "alias_type", new[] { "legacy", "english", "legacy_english", "hobby", "other" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ancestry_vision", new[] { "normal", "low-light-vision", "dark-vision" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "attribute_values", new[] { "free", "str", "dex", "con", "int", "wis", "cha" });
|
||||
@@ -36,14 +36,14 @@ namespace Pf2eModel.Migrations
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "uncommon", "rare", "unique" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "unknown", "trait", "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "spell", "language" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_action_type", new[] { "passive", "action", "reaction", "free" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestryfeature", "classfeature", "calling", "class", "skill", "general", "ancestry", "bonus", "deityboon", "curse", "pfsboon", "campaign_feature" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "uncategorized", "ancestry-feature", "class-feature", "calling", "class", "skill", "general", "ancestry", "bonus", "deityboon", "curse", "pfsboon", "campaign-feature" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size", new[] { "tiny", "small", "medium", "large" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "source_category", new[] { "rulebook", "adventure-path", "lost-omens", "adventures", "comics", "blog-posts", "society" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_area_type", new[] { "burst", "emanation", "cone", "line", "square", "cube", "cylinder" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_category", new[] { "persistent", "splash" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_kinds", new[] { "damage", "healing", "any" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "training_stage", new[] { "untrained", "trained", "expert", "master", "legendary" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "regular", "tradition" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "regular", "class", "tradition" });
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DeityTraining", b =>
|
||||
@@ -622,7 +622,7 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnName("id")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<int>("DedicationFeatId")
|
||||
b.Property<int?>("DedicationFeatId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("dedication_feat_id")
|
||||
.HasColumnOrder(3);
|
||||
@@ -638,13 +638,32 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_archetype");
|
||||
.HasName("pk_archetypes");
|
||||
|
||||
b.HasIndex("DedicationFeatId")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_archetype_dedication_feat_id");
|
||||
.HasDatabaseName("ix_archetypes_dedication_feat_id");
|
||||
|
||||
b.ToTable("archetype", (string)null);
|
||||
b.ToTable("archetypes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ArchetypeRelation.ArchetypeFeats", b =>
|
||||
{
|
||||
b.Property<int>("ArchetypeId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("archetype_id");
|
||||
|
||||
b.Property<int>("FeatId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("feat_id");
|
||||
|
||||
b.HasKey("ArchetypeId", "FeatId")
|
||||
.HasName("pk_archetype_feats");
|
||||
|
||||
b.HasIndex("FeatId")
|
||||
.HasDatabaseName("ix_archetype_feats_feat_id");
|
||||
|
||||
b.ToTable("archetype_feats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Background", b =>
|
||||
@@ -1091,11 +1110,6 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnName("actions")
|
||||
.HasColumnOrder(5);
|
||||
|
||||
b.Property<int>("ArchetypeId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("archetype_id")
|
||||
.HasColumnOrder(10);
|
||||
|
||||
b.Property<ActionCategory>("Category")
|
||||
.HasColumnType("action_category")
|
||||
.HasColumnName("category")
|
||||
@@ -1104,7 +1118,7 @@ namespace Pf2eModel.Migrations
|
||||
b.Property<string>("Extra")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("extra")
|
||||
.HasColumnOrder(11);
|
||||
.HasColumnOrder(10);
|
||||
|
||||
b.Property<bool>("IsFreeAction")
|
||||
.HasColumnType("boolean")
|
||||
@@ -1134,9 +1148,6 @@ namespace Pf2eModel.Migrations
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_feats");
|
||||
|
||||
b.HasIndex("ArchetypeId")
|
||||
.HasDatabaseName("ix_feats_archetype_id");
|
||||
|
||||
b.ToTable("feats", (string)null);
|
||||
});
|
||||
|
||||
@@ -1675,21 +1686,37 @@ namespace Pf2eModel.Migrations
|
||||
.WithOne()
|
||||
.HasForeignKey("Pf2eModel.Model.Structure.Archetype", "DedicationFeatId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_archetype_feats_dedication_feat_id");
|
||||
.HasConstraintName("fk_archetypes_feats_dedication_feat_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
.WithOne()
|
||||
.HasForeignKey("Pf2eModel.Model.Structure.Archetype", "Id")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_archetype_entities_id");
|
||||
.HasConstraintName("fk_archetypes_entities_id");
|
||||
|
||||
b.Navigation("DedicationFeat");
|
||||
|
||||
b.Navigation("Entity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ArchetypeRelation.ArchetypeFeats", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Structure.Archetype", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ArchetypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_archetype_feats_archetypes_archetype_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Structure.Feat", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("FeatId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_archetype_feats_feats_feat_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Background", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
@@ -1903,13 +1930,6 @@ namespace Pf2eModel.Migrations
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Structure.Archetype", "Archetype")
|
||||
.WithMany("Feats")
|
||||
.HasForeignKey("ArchetypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_feats_archetype_archetype_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
.WithOne()
|
||||
.HasForeignKey("Pf2eModel.Model.Structure.Feat", "Id")
|
||||
@@ -1917,8 +1937,6 @@ namespace Pf2eModel.Migrations
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_feats_entities_id");
|
||||
|
||||
b.Navigation("Archetype");
|
||||
|
||||
b.Navigation("Entity");
|
||||
});
|
||||
|
||||
@@ -2071,11 +2089,6 @@ namespace Pf2eModel.Migrations
|
||||
b.Navigation("Heritages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Archetype", b =>
|
||||
{
|
||||
b.Navigation("Feats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Background", b =>
|
||||
{
|
||||
b.Navigation("BackgroundBoosts");
|
||||
+94
-88
@@ -14,7 +14,7 @@ namespace Pf2eModel.Migrations
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterDatabase()
|
||||
.Annotation("Npgsql:Enum:action_category", "unknown,offensive,defensive,interaction,familiar,army_tactic,army_war_action,kingdom_activity,kingdom_feat,kingdom_feature")
|
||||
.Annotation("Npgsql:Enum:action_category", "unknown,archetype,class-feature,class-feat,offensive,defensive,interaction,familiar,army_tactic,army_war_action,kingdom_activity,kingdom_feat,kingdom_feature")
|
||||
.Annotation("Npgsql:Enum:alias_type", "legacy,english,legacy_english,hobby,other")
|
||||
.Annotation("Npgsql:Enum:ancestry_vision", "normal,low-light-vision,dark-vision")
|
||||
.Annotation("Npgsql:Enum:attribute_values", "free,str,dex,con,int,wis,cha")
|
||||
@@ -26,14 +26,14 @@ namespace Pf2eModel.Migrations
|
||||
.Annotation("Npgsql:Enum:entity_rarity", "common,uncommon,rare,unique")
|
||||
.Annotation("Npgsql:Enum:entity_type", "unknown,trait,action,ancestry,archetype,background,backpack,campaign_feature,class,condition,deity,feat,heritage,spell,language")
|
||||
.Annotation("Npgsql:Enum:feat_action_type", "passive,action,reaction,free")
|
||||
.Annotation("Npgsql:Enum:feat_category", "ancestryfeature,classfeature,calling,class,skill,general,ancestry,bonus,deityboon,curse,pfsboon,campaign_feature")
|
||||
.Annotation("Npgsql:Enum:feat_category", "uncategorized,ancestry-feature,class-feature,calling,class,skill,general,ancestry,bonus,deityboon,curse,pfsboon,campaign-feature")
|
||||
.Annotation("Npgsql:Enum:size", "tiny,small,medium,large")
|
||||
.Annotation("Npgsql:Enum:source_category", "rulebook,adventure-path,lost-omens,adventures,comics,blog-posts,society")
|
||||
.Annotation("Npgsql:Enum:spell_area_type", "burst,emanation,cone,line,square,cube,cylinder")
|
||||
.Annotation("Npgsql:Enum:spell_damage_category", "persistent,splash")
|
||||
.Annotation("Npgsql:Enum:spell_damage_kinds", "damage,healing,any")
|
||||
.Annotation("Npgsql:Enum:training_stage", "untrained,trained,expert,master,legendary")
|
||||
.Annotation("Npgsql:Enum:trait_type", "regular,tradition");
|
||||
.Annotation("Npgsql:Enum:trait_type", "regular,class,tradition");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "entities",
|
||||
@@ -269,6 +269,31 @@ namespace Pf2eModel.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "feats",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false),
|
||||
category = table.Column<ActionCategory>(type: "action_category", nullable: false),
|
||||
level = table.Column<int>(type: "integer", nullable: false),
|
||||
actions = table.Column<int>(type: "integer", nullable: true),
|
||||
max_actions = table.Column<int>(type: "integer", nullable: true),
|
||||
is_reaction = table.Column<bool>(type: "boolean", nullable: false),
|
||||
is_free_action = table.Column<bool>(type: "boolean", nullable: false),
|
||||
is_passive = table.Column<bool>(type: "boolean", nullable: false),
|
||||
extra = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_feats", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_feats_entities_id",
|
||||
column: x => x.id,
|
||||
principalTable: "entities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "languages",
|
||||
columns: table => new
|
||||
@@ -729,6 +754,52 @@ namespace Pf2eModel.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "archetypes",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false),
|
||||
level = table.Column<int>(type: "integer", nullable: false),
|
||||
dedication_feat_id = table.Column<int>(type: "integer", nullable: true),
|
||||
extra = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_archetypes", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_archetypes_entities_id",
|
||||
column: x => x.id,
|
||||
principalTable: "entities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "fk_archetypes_feats_dedication_feat_id",
|
||||
column: x => x.dedication_feat_id,
|
||||
principalTable: "feats",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "feat_prerequisites",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
feat_id = table.Column<int>(type: "integer", nullable: false),
|
||||
value = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_feat_prerequisites", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_feat_prerequisites_feats_feat_id",
|
||||
column: x => x.feat_id,
|
||||
principalTable: "feats",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ancestry_languages",
|
||||
columns: table => new
|
||||
@@ -894,71 +965,23 @@ namespace Pf2eModel.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "archetype",
|
||||
name: "archetype_feats",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false),
|
||||
level = table.Column<int>(type: "integer", nullable: false),
|
||||
dedication_feat_id = table.Column<int>(type: "integer", nullable: false),
|
||||
extra = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_archetype", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_archetype_entities_id",
|
||||
column: x => x.id,
|
||||
principalTable: "entities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "feats",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false),
|
||||
category = table.Column<ActionCategory>(type: "action_category", nullable: false),
|
||||
level = table.Column<int>(type: "integer", nullable: false),
|
||||
actions = table.Column<int>(type: "integer", nullable: true),
|
||||
max_actions = table.Column<int>(type: "integer", nullable: true),
|
||||
is_reaction = table.Column<bool>(type: "boolean", nullable: false),
|
||||
is_free_action = table.Column<bool>(type: "boolean", nullable: false),
|
||||
is_passive = table.Column<bool>(type: "boolean", nullable: false),
|
||||
archetype_id = table.Column<int>(type: "integer", nullable: false),
|
||||
extra = table.Column<string>(type: "text", nullable: true)
|
||||
feat_id = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_feats", x => x.id);
|
||||
table.PrimaryKey("pk_archetype_feats", x => new { x.archetype_id, x.feat_id });
|
||||
table.ForeignKey(
|
||||
name: "fk_feats_archetype_archetype_id",
|
||||
name: "fk_archetype_feats_archetypes_archetype_id",
|
||||
column: x => x.archetype_id,
|
||||
principalTable: "archetype",
|
||||
principalTable: "archetypes",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "fk_feats_entities_id",
|
||||
column: x => x.id,
|
||||
principalTable: "entities",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "feat_prerequisites",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
feat_id = table.Column<int>(type: "integer", nullable: false),
|
||||
value = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_feat_prerequisites", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_feat_prerequisites_feats_feat_id",
|
||||
name: "fk_archetype_feats_feats_feat_id",
|
||||
column: x => x.feat_id,
|
||||
principalTable: "feats",
|
||||
principalColumn: "id",
|
||||
@@ -981,8 +1004,13 @@ namespace Pf2eModel.Migrations
|
||||
column: "language_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_archetype_dedication_feat_id",
|
||||
table: "archetype",
|
||||
name: "ix_archetype_feats_feat_id",
|
||||
table: "archetype_feats",
|
||||
column: "feat_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_archetypes_dedication_feat_id",
|
||||
table: "archetypes",
|
||||
column: "dedication_feat_id",
|
||||
unique: true);
|
||||
|
||||
@@ -1081,11 +1109,6 @@ namespace Pf2eModel.Migrations
|
||||
table: "feat_prerequisites",
|
||||
column: "feat_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_feats_archetype_id",
|
||||
table: "feats",
|
||||
column: "archetype_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_heritages_ancestry_id",
|
||||
table: "heritages",
|
||||
@@ -1110,31 +1133,11 @@ namespace Pf2eModel.Migrations
|
||||
name: "ix_spell_defenses_spell_id",
|
||||
table: "spell_defenses",
|
||||
column: "spell_id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "fk_archetype_feats_dedication_feat_id",
|
||||
table: "archetype",
|
||||
column: "dedication_feat_id",
|
||||
principalTable: "feats",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "fk_archetype_entities_id",
|
||||
table: "archetype");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "fk_feats_entities_id",
|
||||
table: "feats");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "fk_archetype_feats_dedication_feat_id",
|
||||
table: "archetype");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "actions");
|
||||
|
||||
@@ -1147,6 +1150,9 @@ namespace Pf2eModel.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "ancestry_languages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "archetype_feats");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "background_boosts");
|
||||
|
||||
@@ -1225,6 +1231,9 @@ namespace Pf2eModel.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "languages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "archetypes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "backgrounds");
|
||||
|
||||
@@ -1255,14 +1264,11 @@ namespace Pf2eModel.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "spells");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "entities");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "feats");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "archetype");
|
||||
name: "entities");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace Pf2eModel.Migrations
|
||||
.HasAnnotation("ProductVersion", "9.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "unknown", "offensive", "defensive", "interaction", "familiar", "army_tactic", "army_war_action", "kingdom_activity", "kingdom_feat", "kingdom_feature" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "unknown", "archetype", "class-feature", "class-feat", "offensive", "defensive", "interaction", "familiar", "army_tactic", "army_war_action", "kingdom_activity", "kingdom_feat", "kingdom_feature" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "alias_type", new[] { "legacy", "english", "legacy_english", "hobby", "other" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ancestry_vision", new[] { "normal", "low-light-vision", "dark-vision" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "attribute_values", new[] { "free", "str", "dex", "con", "int", "wis", "cha" });
|
||||
@@ -33,14 +33,14 @@ namespace Pf2eModel.Migrations
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "uncommon", "rare", "unique" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "unknown", "trait", "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "spell", "language" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_action_type", new[] { "passive", "action", "reaction", "free" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestryfeature", "classfeature", "calling", "class", "skill", "general", "ancestry", "bonus", "deityboon", "curse", "pfsboon", "campaign_feature" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "uncategorized", "ancestry-feature", "class-feature", "calling", "class", "skill", "general", "ancestry", "bonus", "deityboon", "curse", "pfsboon", "campaign-feature" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size", new[] { "tiny", "small", "medium", "large" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "source_category", new[] { "rulebook", "adventure-path", "lost-omens", "adventures", "comics", "blog-posts", "society" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_area_type", new[] { "burst", "emanation", "cone", "line", "square", "cube", "cylinder" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_category", new[] { "persistent", "splash" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_kinds", new[] { "damage", "healing", "any" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "training_stage", new[] { "untrained", "trained", "expert", "master", "legendary" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "regular", "tradition" });
|
||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "regular", "class", "tradition" });
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DeityTraining", b =>
|
||||
@@ -619,7 +619,7 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnName("id")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<int>("DedicationFeatId")
|
||||
b.Property<int?>("DedicationFeatId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("dedication_feat_id")
|
||||
.HasColumnOrder(3);
|
||||
@@ -635,13 +635,32 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_archetype");
|
||||
.HasName("pk_archetypes");
|
||||
|
||||
b.HasIndex("DedicationFeatId")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_archetype_dedication_feat_id");
|
||||
.HasDatabaseName("ix_archetypes_dedication_feat_id");
|
||||
|
||||
b.ToTable("archetype", (string)null);
|
||||
b.ToTable("archetypes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ArchetypeRelation.ArchetypeFeats", b =>
|
||||
{
|
||||
b.Property<int>("ArchetypeId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("archetype_id");
|
||||
|
||||
b.Property<int>("FeatId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("feat_id");
|
||||
|
||||
b.HasKey("ArchetypeId", "FeatId")
|
||||
.HasName("pk_archetype_feats");
|
||||
|
||||
b.HasIndex("FeatId")
|
||||
.HasDatabaseName("ix_archetype_feats_feat_id");
|
||||
|
||||
b.ToTable("archetype_feats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Background", b =>
|
||||
@@ -1088,11 +1107,6 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnName("actions")
|
||||
.HasColumnOrder(5);
|
||||
|
||||
b.Property<int>("ArchetypeId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("archetype_id")
|
||||
.HasColumnOrder(10);
|
||||
|
||||
b.Property<ActionCategory>("Category")
|
||||
.HasColumnType("action_category")
|
||||
.HasColumnName("category")
|
||||
@@ -1101,7 +1115,7 @@ namespace Pf2eModel.Migrations
|
||||
b.Property<string>("Extra")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("extra")
|
||||
.HasColumnOrder(11);
|
||||
.HasColumnOrder(10);
|
||||
|
||||
b.Property<bool>("IsFreeAction")
|
||||
.HasColumnType("boolean")
|
||||
@@ -1131,9 +1145,6 @@ namespace Pf2eModel.Migrations
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_feats");
|
||||
|
||||
b.HasIndex("ArchetypeId")
|
||||
.HasDatabaseName("ix_feats_archetype_id");
|
||||
|
||||
b.ToTable("feats", (string)null);
|
||||
});
|
||||
|
||||
@@ -1672,21 +1683,37 @@ namespace Pf2eModel.Migrations
|
||||
.WithOne()
|
||||
.HasForeignKey("Pf2eModel.Model.Structure.Archetype", "DedicationFeatId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_archetype_feats_dedication_feat_id");
|
||||
.HasConstraintName("fk_archetypes_feats_dedication_feat_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
.WithOne()
|
||||
.HasForeignKey("Pf2eModel.Model.Structure.Archetype", "Id")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_archetype_entities_id");
|
||||
.HasConstraintName("fk_archetypes_entities_id");
|
||||
|
||||
b.Navigation("DedicationFeat");
|
||||
|
||||
b.Navigation("Entity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.ArchetypeRelation.ArchetypeFeats", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Structure.Archetype", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ArchetypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_archetype_feats_archetypes_archetype_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Structure.Feat", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("FeatId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_archetype_feats_feats_feat_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Background", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
@@ -1900,13 +1927,6 @@ namespace Pf2eModel.Migrations
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
|
||||
{
|
||||
b.HasOne("Pf2eModel.Model.Structure.Archetype", "Archetype")
|
||||
.WithMany("Feats")
|
||||
.HasForeignKey("ArchetypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_feats_archetype_archetype_id");
|
||||
|
||||
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
|
||||
.WithOne()
|
||||
.HasForeignKey("Pf2eModel.Model.Structure.Feat", "Id")
|
||||
@@ -1914,8 +1934,6 @@ namespace Pf2eModel.Migrations
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_feats_entities_id");
|
||||
|
||||
b.Navigation("Archetype");
|
||||
|
||||
b.Navigation("Entity");
|
||||
});
|
||||
|
||||
@@ -2068,11 +2086,6 @@ namespace Pf2eModel.Migrations
|
||||
b.Navigation("Heritages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Archetype", b =>
|
||||
{
|
||||
b.Navigation("Feats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Structure.Background", b =>
|
||||
{
|
||||
b.Navigation("BackgroundBoosts");
|
||||
|
||||
Reference in New Issue
Block a user