Merge remote-tracking branch 'origin/dev2' into dev

This commit is contained in:
2025-09-15 09:48:54 +04:00
87 changed files with 6607 additions and 145 deletions
+196 -19
View File
@@ -13,7 +13,11 @@ using Pf2eModel.Model.Enum;
namespace Pf2eModel.Migrations
{
[DbContext(typeof(Pf2eDbContext))]
<<<<<<<< HEAD:Pf2eModel/Migrations/20250912112500_1.Designer.cs
[Migration("20250912112500_1")]
========
[Migration("20250914093120_1")]
>>>>>>>> origin/dev2:Pf2eModel/Migrations/20250914093120_1.Designer.cs
partial class _1
{
/// <inheritdoc />
@@ -29,12 +33,12 @@ namespace Pf2eModel.Migrations
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "attribute_values", new[] { "cha", "con", "dex", "free", "int", "str", "wis" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "class_progression_type", new[] { "ancestry_feat", "attribute_increase", "class_feat", "entity", "general_feat", "skill_feat", "skill_increase" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "condition_group", new[] { "abilities", "attitudes", "death", "detection", "senses", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_category", new[] { "covenant", "deity", "pantheon", "philosophy" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_fonts", new[] { "any", "harm", "heal", "none" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_sanctification", new[] { "any", "holy", "unholy" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_type", new[] { "covenant", "deity", "pantheon", "philosophy" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "element_enum", new[] { "air", "earth", "fire", "metal", "universal", "water", "wood" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "rare", "uncommon", "unique" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "language", "ritual", "rule", "spell", "subclass", "subclass_group", "trait", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "domain", "feat", "heritage", "language", "ritual", "rule", "spell", "subclass", "subclass_group", "trait", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestry", "ancestry-feature", "archetype", "bonus", "calling", "campaign-feature", "class", "class-feature", "curse", "deityboon", "general", "pfsboon", "skill", "uncategorized" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "locale_type", new[] { "english", "hobby", "other", "russian" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size_enum", new[] { "huge", "large", "medium", "small", "tiny" });
@@ -44,7 +48,7 @@ namespace Pf2eModel.Migrations
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_kinds", new[] { "any", "damage", "healing" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_tradition", new[] { "all", "arcane", "divine", "elemental", "none", "occult", "primal" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "training_rank", new[] { "expert", "legendary", "master", "mythic", "trained", "untrained" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "class", "regular", "tradition" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "alignment", "class", "regular", "tradition" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "vision_enum", new[] { "dark-vision", "low-light-vision", "normal" });
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -896,11 +900,11 @@ namespace Pf2eModel.Migrations
.HasColumnOrder(2)
.HasComment("Количество очков здоровья");
b.Property<bool>("Spellcasting")
.HasColumnType("boolean")
b.Property<int>("Spellcasting")
.HasColumnType("integer")
.HasColumnName("spellcasting")
.HasColumnOrder(3)
.HasComment("Заклинатель?");
.HasComment("Тип заклинательства");
b.Property<SpellTradition?>("Tradition")
.HasColumnType("spell_tradition")
@@ -1128,30 +1132,72 @@ namespace Pf2eModel.Migrations
.HasColumnOrder(1)
.HasComment("Идентификатор");
b.Property<DeityCategory>("Category")
.HasColumnType("deity_category")
b.Property<string>("Anathema")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("anathema")
.HasColumnOrder(8)
.HasComment("Анафемы божества");
b.Property<string>("AreaOfConcern")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("area_of_concern")
.HasColumnOrder(11)
.HasComment("Область покровительства божества");
b.Property<string>("Category")
.IsRequired()
.HasColumnType("text")
.HasColumnName("category")
.HasColumnOrder(2)
.HasComment("Тип божества");
.HasColumnOrder(3)
.HasComment("Категория божества");
b.Property<string>("Edicts")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("edicts")
.HasColumnOrder(7)
.HasComment("Заветы божества");
b.Property<DeityFonts>("Fonts")
.HasColumnType("deity_fonts")
.HasColumnName("fonts")
.HasColumnOrder(3)
.HasColumnOrder(4)
.HasComment("Тип божественной силы");
b.Property<string>("ReligiousSymbol")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("religious_symbol")
.HasColumnOrder(9)
.HasComment("Религиозный символ божества");
b.Property<string>("SacredAnimal")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("sacred_animal")
.HasColumnOrder(10)
.HasComment("Священное животное божества");
b.Property<DeitySanctification>("Sanctification")
.HasColumnType("deity_sanctification")
.HasColumnName("sanctification")
.HasColumnOrder(4)
.HasColumnOrder(5)
.HasComment("Тип освящения");
b.Property<bool>("SanctificationMust")
.HasColumnType("boolean")
.HasColumnName("sanctification_must")
.HasColumnOrder(5)
.HasColumnOrder(6)
.HasComment("Обязательное освящение");
b.Property<DeityType>("Type")
.HasColumnType("deity_type")
.HasColumnName("type")
.HasColumnOrder(2)
.HasComment("Тип божества");
b.HasKey("Id")
.HasName("pk_deities");
@@ -1160,21 +1206,33 @@ namespace Pf2eModel.Migrations
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityRelation.DeityAttribute", b =>
{
b.Property<int>("DeityId")
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("deity_id")
.HasColumnName("id")
.HasColumnOrder(1)
.HasComment("Идентификатор божества");
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<AttributeValues>("Attribute")
.HasColumnType("attribute_values")
.HasColumnName("attribute")
.HasColumnOrder(2)
.HasColumnOrder(3)
.HasComment("Атрибут божества");
b.HasKey("DeityId", "Attribute")
b.Property<int>("DeityId")
.HasColumnType("integer")
.HasColumnName("deity_id")
.HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.HasKey("Id")
.HasName("pk_deity_attributes");
b.HasIndex("DeityId")
.HasDatabaseName("ix_deity_attributes_deity_id");
b.ToTable("deity_attributes", (string)null);
});
@@ -1195,6 +1253,12 @@ namespace Pf2eModel.Migrations
.HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.Property<int>("DomainId")
.HasColumnType("integer")
.HasColumnName("domain_id")
.HasColumnOrder(4)
.HasComment("Идентификатор домена");
b.Property<bool>("IsPrimary")
.HasColumnType("boolean")
.HasColumnName("is_primary")
@@ -1206,7 +1270,7 @@ namespace Pf2eModel.Migrations
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("value")
.HasColumnOrder(4);
.HasColumnOrder(5);
b.HasKey("Id")
.HasName("pk_deity_domains");
@@ -1214,6 +1278,9 @@ namespace Pf2eModel.Migrations
b.HasIndex("DeityId")
.HasDatabaseName("ix_deity_domains_deity_id");
b.HasIndex("DomainId")
.HasDatabaseName("ix_deity_domains_domain_id");
b.ToTable("deity_domains", (string)null);
});
@@ -1292,6 +1359,56 @@ namespace Pf2eModel.Migrations
b.ToTable("deity_weapons", (string)null);
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.Property<int>("Id")
.HasColumnType("integer")
.HasColumnName("id")
.HasColumnOrder(1)
.HasComment("Идентификатор");
b.Property<int?>("AdvancedApocryphalSpellId")
.HasColumnType("integer")
.HasColumnName("advanced_apocryphal_spell_id")
.HasColumnOrder(5)
.HasComment("Продвинутое апокрифическое заклинание домена");
b.Property<int>("AdvancedDomainSpellId")
.HasColumnType("integer")
.HasColumnName("advanced_domain_spell_id")
.HasColumnOrder(3)
.HasComment("Продвинутое заклинание домена");
b.Property<int?>("ApocryphalSpellId")
.HasColumnType("integer")
.HasColumnName("apocryphal_spell_id")
.HasColumnOrder(4)
.HasComment("Апокрифическое заклинание домена");
b.Property<int>("DomainSpellId")
.HasColumnType("integer")
.HasColumnName("domain_spell_id")
.HasColumnOrder(2)
.HasComment("Заклинание домена");
b.HasKey("Id")
.HasName("pk_domains");
b.HasIndex("AdvancedApocryphalSpellId")
.HasDatabaseName("ix_domains_advanced_apocryphal_spell_id");
b.HasIndex("AdvancedDomainSpellId")
.HasDatabaseName("ix_domains_advanced_domain_spell_id");
b.HasIndex("ApocryphalSpellId")
.HasDatabaseName("ix_domains_apocryphal_spell_id");
b.HasIndex("DomainSpellId")
.HasDatabaseName("ix_domains_domain_spell_id");
b.ToTable("domains", (string)null);
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.Property<int>("Id")
@@ -2406,7 +2523,16 @@ namespace Pf2eModel.Migrations
.IsRequired()
.HasConstraintName("fk_deity_domains_deities_deity_id");
b.HasOne("Pf2eModel.Model.Structure.Domain", "Domain")
.WithMany("DeityDomains")
.HasForeignKey("DomainId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_deity_domains_domains_domain_id");
b.Navigation("Deity");
b.Navigation("Domain");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityRelation.DeitySpell", b =>
@@ -2442,6 +2568,52 @@ namespace Pf2eModel.Migrations
b.Navigation("Deity");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.HasOne("Pf2eModel.Model.Structure.Spell", "AdvancedApocryphalSpell")
.WithMany()
.HasForeignKey("AdvancedApocryphalSpellId")
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("fk_domains_spells_advanced_apocryphal_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "AdvancedDomainSpell")
.WithMany()
.HasForeignKey("AdvancedDomainSpellId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_spells_advanced_domain_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "ApocryphalSpell")
.WithMany()
.HasForeignKey("ApocryphalSpellId")
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("fk_domains_spells_apocryphal_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "DomainSpell")
.WithMany()
.HasForeignKey("DomainSpellId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_spells_domain_spell_id");
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
.WithOne()
.HasForeignKey("Pf2eModel.Model.Structure.Domain", "Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_entities_id");
b.Navigation("AdvancedApocryphalSpell");
b.Navigation("AdvancedDomainSpell");
b.Navigation("ApocryphalSpell");
b.Navigation("DomainSpell");
b.Navigation("Entity");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
@@ -2732,6 +2904,11 @@ namespace Pf2eModel.Migrations
b.Navigation("DeityWeapons");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.Navigation("DeityDomains");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.Navigation("FeatPrerequisites");
+124 -31
View File
@@ -19,12 +19,12 @@ namespace Pf2eModel.Migrations
.Annotation("Npgsql:Enum:attribute_values", "cha,con,dex,free,int,str,wis")
.Annotation("Npgsql:Enum:class_progression_type", "ancestry_feat,attribute_increase,class_feat,entity,general_feat,skill_feat,skill_increase")
.Annotation("Npgsql:Enum:condition_group", "abilities,attitudes,death,detection,senses,unknown")
.Annotation("Npgsql:Enum:deity_category", "covenant,deity,pantheon,philosophy")
.Annotation("Npgsql:Enum:deity_fonts", "any,harm,heal,none")
.Annotation("Npgsql:Enum:deity_sanctification", "any,holy,unholy")
.Annotation("Npgsql:Enum:deity_type", "covenant,deity,pantheon,philosophy")
.Annotation("Npgsql:Enum:element_enum", "air,earth,fire,metal,universal,water,wood")
.Annotation("Npgsql:Enum:entity_rarity", "common,rare,uncommon,unique")
.Annotation("Npgsql:Enum:entity_type", "action,ancestry,archetype,background,backpack,campaign_feature,class,condition,deity,feat,heritage,language,ritual,rule,spell,subclass,subclass_group,trait,unknown")
.Annotation("Npgsql:Enum:entity_type", "action,ancestry,archetype,background,backpack,campaign_feature,class,condition,deity,domain,feat,heritage,language,ritual,rule,spell,subclass,subclass_group,trait,unknown")
.Annotation("Npgsql:Enum:feat_category", "ancestry,ancestry-feature,archetype,bonus,calling,campaign-feature,class,class-feature,curse,deityboon,general,pfsboon,skill,uncategorized")
.Annotation("Npgsql:Enum:locale_type", "english,hobby,other,russian")
.Annotation("Npgsql:Enum:size_enum", "huge,large,medium,small,tiny")
@@ -34,7 +34,7 @@ namespace Pf2eModel.Migrations
.Annotation("Npgsql:Enum:spell_damage_kinds", "any,damage,healing")
.Annotation("Npgsql:Enum:spell_tradition", "all,arcane,divine,elemental,none,occult,primal")
.Annotation("Npgsql:Enum:training_rank", "expert,legendary,master,mythic,trained,untrained")
.Annotation("Npgsql:Enum:trait_type", "class,regular,tradition")
.Annotation("Npgsql:Enum:trait_type", "alignment,class,regular,tradition")
.Annotation("Npgsql:Enum:vision_enum", "dark-vision,low-light-vision,normal");
migrationBuilder.CreateTable(
@@ -195,7 +195,7 @@ namespace Pf2eModel.Migrations
{
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор"),
hp = table.Column<int>(type: "integer", nullable: false, comment: "Количество очков здоровья"),
spellcasting = table.Column<bool>(type: "boolean", nullable: false, comment: "Заклинатель?"),
spellcasting = table.Column<int>(type: "integer", nullable: false, comment: "Тип заклинательства"),
tradition = table.Column<SpellTradition>(type: "spell_tradition", nullable: true, comment: "Традиция заклинаний"),
additional_trained_skills = table.Column<int>(type: "integer", nullable: false, comment: "Дополнительные навыки")
},
@@ -234,10 +234,16 @@ namespace Pf2eModel.Migrations
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор"),
category = table.Column<DeityCategory>(type: "deity_category", nullable: false, comment: "Тип божества"),
type = table.Column<DeityType>(type: "deity_type", nullable: false, comment: "Тип божества"),
category = table.Column<string>(type: "text", nullable: false, comment: "Категория божества"),
fonts = table.Column<DeityFonts>(type: "deity_fonts", nullable: false, comment: "Тип божественной силы"),
sanctification = table.Column<DeitySanctification>(type: "deity_sanctification", nullable: false, comment: "Тип освящения"),
sanctification_must = table.Column<bool>(type: "boolean", nullable: false, comment: "Обязательное освящение")
sanctification_must = table.Column<bool>(type: "boolean", nullable: false, comment: "Обязательное освящение"),
edicts = table.Column<string>(type: "jsonb", nullable: false, comment: "Заветы божества"),
anathema = table.Column<string>(type: "jsonb", nullable: false, comment: "Анафемы божества"),
religious_symbol = table.Column<string>(type: "jsonb", nullable: false, comment: "Религиозный символ божества"),
sacred_animal = table.Column<string>(type: "jsonb", nullable: false, comment: "Священное животное божества"),
area_of_concern = table.Column<string>(type: "jsonb", nullable: false, comment: "Область покровительства божества")
},
constraints: table =>
{
@@ -778,12 +784,14 @@ namespace Pf2eModel.Migrations
name: "deity_attributes",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
attribute = table.Column<AttributeValues>(type: "attribute_values", nullable: false, comment: "Атрибут божества")
},
constraints: table =>
{
table.PrimaryKey("pk_deity_attributes", x => new { x.deity_id, x.attribute });
table.PrimaryKey("pk_deity_attributes", x => x.id);
table.ForeignKey(
name: "fk_deity_attributes_deities_deity_id",
column: x => x.deity_id,
@@ -792,27 +800,6 @@ namespace Pf2eModel.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "deity_domains",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
is_primary = table.Column<bool>(type: "boolean", nullable: false, comment: "Флаг основного домена"),
value = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_deity_domains", x => x.id);
table.ForeignKey(
name: "fk_deity_domains_deities_deity_id",
column: x => x.deity_id,
principalTable: "deities",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "deity_training",
columns: table => new
@@ -1003,6 +990,51 @@ namespace Pf2eModel.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "domains",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор"),
domain_spell_id = table.Column<int>(type: "integer", nullable: false, comment: "Заклинание домена"),
advanced_domain_spell_id = table.Column<int>(type: "integer", nullable: false, comment: "Продвинутое заклинание домена"),
apocryphal_spell_id = table.Column<int>(type: "integer", nullable: true, comment: "Апокрифическое заклинание домена"),
advanced_apocryphal_spell_id = table.Column<int>(type: "integer", nullable: true, comment: "Продвинутое апокрифическое заклинание домена")
},
constraints: table =>
{
table.PrimaryKey("pk_domains", x => x.id);
table.ForeignKey(
name: "fk_domains_entities_id",
column: x => x.id,
principalTable: "entities",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_domains_spells_advanced_apocryphal_spell_id",
column: x => x.advanced_apocryphal_spell_id,
principalTable: "spells",
principalColumn: "id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "fk_domains_spells_advanced_domain_spell_id",
column: x => x.advanced_domain_spell_id,
principalTable: "spells",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_domains_spells_apocryphal_spell_id",
column: x => x.apocryphal_spell_id,
principalTable: "spells",
principalColumn: "id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "fk_domains_spells_domain_spell_id",
column: x => x.domain_spell_id,
principalTable: "spells",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "spell_areas",
columns: table => new
@@ -1146,6 +1178,34 @@ namespace Pf2eModel.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "deity_domains",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор")
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
deity_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор божества"),
is_primary = table.Column<bool>(type: "boolean", nullable: false, comment: "Флаг основного домена"),
domain_id = table.Column<int>(type: "integer", nullable: false, comment: "Идентификатор домена"),
value = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_deity_domains", x => x.id);
table.ForeignKey(
name: "fk_deity_domains_deities_deity_id",
column: x => x.deity_id,
principalTable: "deities",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "fk_deity_domains_domains_domain_id",
column: x => x.domain_id,
principalTable: "domains",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "subclass_provided_entities",
columns: table => new
@@ -1268,11 +1328,21 @@ namespace Pf2eModel.Migrations
table: "class_trainings",
column: "training_id");
migrationBuilder.CreateIndex(
name: "ix_deity_attributes_deity_id",
table: "deity_attributes",
column: "deity_id");
migrationBuilder.CreateIndex(
name: "ix_deity_domains_deity_id",
table: "deity_domains",
column: "deity_id");
migrationBuilder.CreateIndex(
name: "ix_deity_domains_domain_id",
table: "deity_domains",
column: "domain_id");
migrationBuilder.CreateIndex(
name: "ix_deity_spells_deity_id",
table: "deity_spells",
@@ -1293,6 +1363,26 @@ namespace Pf2eModel.Migrations
table: "deity_weapons",
column: "deity_id");
migrationBuilder.CreateIndex(
name: "ix_domains_advanced_apocryphal_spell_id",
table: "domains",
column: "advanced_apocryphal_spell_id");
migrationBuilder.CreateIndex(
name: "ix_domains_advanced_domain_spell_id",
table: "domains",
column: "advanced_domain_spell_id");
migrationBuilder.CreateIndex(
name: "ix_domains_apocryphal_spell_id",
table: "domains",
column: "apocryphal_spell_id");
migrationBuilder.CreateIndex(
name: "ix_domains_domain_spell_id",
table: "domains",
column: "domain_spell_id");
migrationBuilder.CreateIndex(
name: "ix_entity_aliases_entity_id",
table: "entity_aliases",
@@ -1521,6 +1611,9 @@ namespace Pf2eModel.Migrations
migrationBuilder.DropTable(
name: "backgrounds");
migrationBuilder.DropTable(
name: "domains");
migrationBuilder.DropTable(
name: "deities");
@@ -1542,9 +1635,6 @@ namespace Pf2eModel.Migrations
migrationBuilder.DropTable(
name: "rituals");
migrationBuilder.DropTable(
name: "spells");
migrationBuilder.DropTable(
name: "subclasses");
@@ -1554,6 +1644,9 @@ namespace Pf2eModel.Migrations
migrationBuilder.DropTable(
name: "feats");
migrationBuilder.DropTable(
name: "spells");
migrationBuilder.DropTable(
name: "subclass_groups");
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -26,12 +26,12 @@ namespace Pf2eModel.Migrations
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "attribute_values", new[] { "cha", "con", "dex", "free", "int", "str", "wis" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "class_progression_type", new[] { "ancestry_feat", "attribute_increase", "class_feat", "entity", "general_feat", "skill_feat", "skill_increase" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "condition_group", new[] { "abilities", "attitudes", "death", "detection", "senses", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_category", new[] { "covenant", "deity", "pantheon", "philosophy" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_fonts", new[] { "any", "harm", "heal", "none" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_sanctification", new[] { "any", "holy", "unholy" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "deity_type", new[] { "covenant", "deity", "pantheon", "philosophy" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "element_enum", new[] { "air", "earth", "fire", "metal", "universal", "water", "wood" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_rarity", new[] { "common", "rare", "uncommon", "unique" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "feat", "heritage", "language", "ritual", "rule", "spell", "subclass", "subclass_group", "trait", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "action", "ancestry", "archetype", "background", "backpack", "campaign_feature", "class", "condition", "deity", "domain", "feat", "heritage", "language", "ritual", "rule", "spell", "subclass", "subclass_group", "trait", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "feat_category", new[] { "ancestry", "ancestry-feature", "archetype", "bonus", "calling", "campaign-feature", "class", "class-feature", "curse", "deityboon", "general", "pfsboon", "skill", "uncategorized" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "locale_type", new[] { "english", "hobby", "other", "russian" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "size_enum", new[] { "huge", "large", "medium", "small", "tiny" });
@@ -41,7 +41,7 @@ namespace Pf2eModel.Migrations
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_damage_kinds", new[] { "any", "damage", "healing" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "spell_tradition", new[] { "all", "arcane", "divine", "elemental", "none", "occult", "primal" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "training_rank", new[] { "expert", "legendary", "master", "mythic", "trained", "untrained" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "class", "regular", "tradition" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "trait_type", new[] { "alignment", "class", "regular", "tradition" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "vision_enum", new[] { "dark-vision", "low-light-vision", "normal" });
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -893,11 +893,11 @@ namespace Pf2eModel.Migrations
.HasColumnOrder(2)
.HasComment("Количество очков здоровья");
b.Property<bool>("Spellcasting")
.HasColumnType("boolean")
b.Property<int>("Spellcasting")
.HasColumnType("integer")
.HasColumnName("spellcasting")
.HasColumnOrder(3)
.HasComment("Заклинатель?");
.HasComment("Тип заклинательства");
b.Property<SpellTradition?>("Tradition")
.HasColumnType("spell_tradition")
@@ -1125,30 +1125,72 @@ namespace Pf2eModel.Migrations
.HasColumnOrder(1)
.HasComment("Идентификатор");
b.Property<DeityCategory>("Category")
.HasColumnType("deity_category")
b.Property<string>("Anathema")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("anathema")
.HasColumnOrder(8)
.HasComment("Анафемы божества");
b.Property<string>("AreaOfConcern")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("area_of_concern")
.HasColumnOrder(11)
.HasComment("Область покровительства божества");
b.Property<string>("Category")
.IsRequired()
.HasColumnType("text")
.HasColumnName("category")
.HasColumnOrder(2)
.HasComment("Тип божества");
.HasColumnOrder(3)
.HasComment("Категория божества");
b.Property<string>("Edicts")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("edicts")
.HasColumnOrder(7)
.HasComment("Заветы божества");
b.Property<DeityFonts>("Fonts")
.HasColumnType("deity_fonts")
.HasColumnName("fonts")
.HasColumnOrder(3)
.HasColumnOrder(4)
.HasComment("Тип божественной силы");
b.Property<string>("ReligiousSymbol")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("religious_symbol")
.HasColumnOrder(9)
.HasComment("Религиозный символ божества");
b.Property<string>("SacredAnimal")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("sacred_animal")
.HasColumnOrder(10)
.HasComment("Священное животное божества");
b.Property<DeitySanctification>("Sanctification")
.HasColumnType("deity_sanctification")
.HasColumnName("sanctification")
.HasColumnOrder(4)
.HasColumnOrder(5)
.HasComment("Тип освящения");
b.Property<bool>("SanctificationMust")
.HasColumnType("boolean")
.HasColumnName("sanctification_must")
.HasColumnOrder(5)
.HasColumnOrder(6)
.HasComment("Обязательное освящение");
b.Property<DeityType>("Type")
.HasColumnType("deity_type")
.HasColumnName("type")
.HasColumnOrder(2)
.HasComment("Тип божества");
b.HasKey("Id")
.HasName("pk_deities");
@@ -1157,21 +1199,33 @@ namespace Pf2eModel.Migrations
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityRelation.DeityAttribute", b =>
{
b.Property<int>("DeityId")
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("deity_id")
.HasColumnName("id")
.HasColumnOrder(1)
.HasComment("Идентификатор божества");
.HasComment("Идентификатор");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<AttributeValues>("Attribute")
.HasColumnType("attribute_values")
.HasColumnName("attribute")
.HasColumnOrder(2)
.HasColumnOrder(3)
.HasComment("Атрибут божества");
b.HasKey("DeityId", "Attribute")
b.Property<int>("DeityId")
.HasColumnType("integer")
.HasColumnName("deity_id")
.HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.HasKey("Id")
.HasName("pk_deity_attributes");
b.HasIndex("DeityId")
.HasDatabaseName("ix_deity_attributes_deity_id");
b.ToTable("deity_attributes", (string)null);
});
@@ -1192,6 +1246,12 @@ namespace Pf2eModel.Migrations
.HasColumnOrder(2)
.HasComment("Идентификатор божества");
b.Property<int>("DomainId")
.HasColumnType("integer")
.HasColumnName("domain_id")
.HasColumnOrder(4)
.HasComment("Идентификатор домена");
b.Property<bool>("IsPrimary")
.HasColumnType("boolean")
.HasColumnName("is_primary")
@@ -1203,7 +1263,7 @@ namespace Pf2eModel.Migrations
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("value")
.HasColumnOrder(4);
.HasColumnOrder(5);
b.HasKey("Id")
.HasName("pk_deity_domains");
@@ -1211,6 +1271,9 @@ namespace Pf2eModel.Migrations
b.HasIndex("DeityId")
.HasDatabaseName("ix_deity_domains_deity_id");
b.HasIndex("DomainId")
.HasDatabaseName("ix_deity_domains_domain_id");
b.ToTable("deity_domains", (string)null);
});
@@ -1289,6 +1352,56 @@ namespace Pf2eModel.Migrations
b.ToTable("deity_weapons", (string)null);
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.Property<int>("Id")
.HasColumnType("integer")
.HasColumnName("id")
.HasColumnOrder(1)
.HasComment("Идентификатор");
b.Property<int?>("AdvancedApocryphalSpellId")
.HasColumnType("integer")
.HasColumnName("advanced_apocryphal_spell_id")
.HasColumnOrder(5)
.HasComment("Продвинутое апокрифическое заклинание домена");
b.Property<int>("AdvancedDomainSpellId")
.HasColumnType("integer")
.HasColumnName("advanced_domain_spell_id")
.HasColumnOrder(3)
.HasComment("Продвинутое заклинание домена");
b.Property<int?>("ApocryphalSpellId")
.HasColumnType("integer")
.HasColumnName("apocryphal_spell_id")
.HasColumnOrder(4)
.HasComment("Апокрифическое заклинание домена");
b.Property<int>("DomainSpellId")
.HasColumnType("integer")
.HasColumnName("domain_spell_id")
.HasColumnOrder(2)
.HasComment("Заклинание домена");
b.HasKey("Id")
.HasName("pk_domains");
b.HasIndex("AdvancedApocryphalSpellId")
.HasDatabaseName("ix_domains_advanced_apocryphal_spell_id");
b.HasIndex("AdvancedDomainSpellId")
.HasDatabaseName("ix_domains_advanced_domain_spell_id");
b.HasIndex("ApocryphalSpellId")
.HasDatabaseName("ix_domains_apocryphal_spell_id");
b.HasIndex("DomainSpellId")
.HasDatabaseName("ix_domains_domain_spell_id");
b.ToTable("domains", (string)null);
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.Property<int>("Id")
@@ -2403,7 +2516,16 @@ namespace Pf2eModel.Migrations
.IsRequired()
.HasConstraintName("fk_deity_domains_deities_deity_id");
b.HasOne("Pf2eModel.Model.Structure.Domain", "Domain")
.WithMany("DeityDomains")
.HasForeignKey("DomainId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_deity_domains_domains_domain_id");
b.Navigation("Deity");
b.Navigation("Domain");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.DeityRelation.DeitySpell", b =>
@@ -2439,6 +2561,52 @@ namespace Pf2eModel.Migrations
b.Navigation("Deity");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.HasOne("Pf2eModel.Model.Structure.Spell", "AdvancedApocryphalSpell")
.WithMany()
.HasForeignKey("AdvancedApocryphalSpellId")
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("fk_domains_spells_advanced_apocryphal_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "AdvancedDomainSpell")
.WithMany()
.HasForeignKey("AdvancedDomainSpellId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_spells_advanced_domain_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "ApocryphalSpell")
.WithMany()
.HasForeignKey("ApocryphalSpellId")
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("fk_domains_spells_apocryphal_spell_id");
b.HasOne("Pf2eModel.Model.Structure.Spell", "DomainSpell")
.WithMany()
.HasForeignKey("DomainSpellId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_spells_domain_spell_id");
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
.WithOne()
.HasForeignKey("Pf2eModel.Model.Structure.Domain", "Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_domains_entities_id");
b.Navigation("AdvancedApocryphalSpell");
b.Navigation("AdvancedDomainSpell");
b.Navigation("ApocryphalSpell");
b.Navigation("DomainSpell");
b.Navigation("Entity");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.HasOne("Pf2eModel.Model.Base.Entity", "Entity")
@@ -2729,6 +2897,11 @@ namespace Pf2eModel.Migrations
b.Navigation("DeityWeapons");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Domain", b =>
{
b.Navigation("DeityDomains");
});
modelBuilder.Entity("Pf2eModel.Model.Structure.Feat", b =>
{
b.Navigation("FeatPrerequisites");