Подготовка изменений

This commit is contained in:
2025-09-13 11:39:23 +04:00
parent 843d0a4aa3
commit 776abeb58a
10 changed files with 94 additions and 28 deletions
@@ -13,7 +13,7 @@ using Pf2eModel.Model.Enum;
namespace Pf2eModel.Migrations
{
[DbContext(typeof(Pf2eDbContext))]
[Migration("20250602061959_1")]
[Migration("20250913071004_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[] { "archetype", "army_tactic", "army_war_action", "class-feat", "class-feature", "defensive", "familiar", "interaction", "kingdom_activity", "kingdom_feat", "kingdom_feature", "offensive", "skill-action", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "archetype", "army_tactic", "army_war_action", "class-feat", "class-feature", "familiar", "kingdom_activity", "kingdom_feat", "kingdom_feature", "skill-action", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_enum", new[] { "1", "1 hour", "1 minute", "1-2", "1-3", "10 minutes", "2", "2-3", "2/2 rounds", "3", "30 minutes", "5 minutes", "free", "free/1", "other", "passive", "reaction", "reaction/1", "reaction/2", "reaction/3", "unknown" });
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" });
@@ -134,13 +134,19 @@ namespace Pf2eModel.Migrations
.HasColumnType("boolean")
.HasColumnName("is_checked")
.HasColumnOrder(9)
.HasComment("Флаг, указывающий, что сущность был проверен и не требует автоматической перезаписи");
.HasComment("Проверено?");
b.Property<bool?>("IsLegacy")
.HasColumnType("boolean")
.HasColumnName("is_legacy")
.HasColumnOrder(10)
.HasComment("Устаревшая?");
b.Property<bool?>("IsTranslated")
.HasColumnType("boolean")
.HasColumnName("is_translated")
.HasColumnOrder(8)
.HasComment("Флаг, указывающий, что у сущности существует перевод");
.HasComment("Есть перевод?");
b.Property<string>("Name")
.IsRequired()
@@ -890,11 +896,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")
@@ -14,7 +14,7 @@ namespace Pf2eModel.Migrations
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("Npgsql:Enum:action_category", "archetype,army_tactic,army_war_action,class-feat,class-feature,defensive,familiar,interaction,kingdom_activity,kingdom_feat,kingdom_feature,offensive,skill-action,unknown")
.Annotation("Npgsql:Enum:action_category", "archetype,army_tactic,army_war_action,class-feat,class-feature,familiar,kingdom_activity,kingdom_feat,kingdom_feature,skill-action,unknown")
.Annotation("Npgsql:Enum:action_enum", "1,1 hour,1 minute,1-2,1-3,10 minutes,2,2-3,2/2 rounds,3,30 minutes,5 minutes,free,free/1,other,passive,reaction,reaction/1,reaction/2,reaction/3,unknown")
.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")
@@ -49,8 +49,9 @@ namespace Pf2eModel.Migrations
img = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Изображение объекта"),
description = table.Column<string>(type: "text", nullable: false, comment: "Текстовое описание сущности"),
rarity = table.Column<EntityRarity>(type: "entity_rarity", nullable: false, comment: "Редкость сущности"),
is_translated = table.Column<bool>(type: "boolean", nullable: true, comment: "Флаг, указывающий, что у сущности существует перевод"),
is_checked = table.Column<bool>(type: "boolean", nullable: true, comment: "Флаг, указывающий, что сущность был проверен и не требует автоматической перезаписи")
is_translated = table.Column<bool>(type: "boolean", nullable: true, comment: "Есть перевод?"),
is_checked = table.Column<bool>(type: "boolean", nullable: true, comment: "Проверено?"),
is_legacy = table.Column<bool>(type: "boolean", nullable: true, comment: "Устаревшая?")
},
constraints: table =>
{
@@ -194,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: "Дополнительные навыки")
},
@@ -21,7 +21,7 @@ namespace Pf2eModel.Migrations
.HasAnnotation("ProductVersion", "9.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "archetype", "army_tactic", "army_war_action", "class-feat", "class-feature", "defensive", "familiar", "interaction", "kingdom_activity", "kingdom_feat", "kingdom_feature", "offensive", "skill-action", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_category", new[] { "archetype", "army_tactic", "army_war_action", "class-feat", "class-feature", "familiar", "kingdom_activity", "kingdom_feat", "kingdom_feature", "skill-action", "unknown" });
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "action_enum", new[] { "1", "1 hour", "1 minute", "1-2", "1-3", "10 minutes", "2", "2-3", "2/2 rounds", "3", "30 minutes", "5 minutes", "free", "free/1", "other", "passive", "reaction", "reaction/1", "reaction/2", "reaction/3", "unknown" });
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" });
@@ -131,13 +131,19 @@ namespace Pf2eModel.Migrations
.HasColumnType("boolean")
.HasColumnName("is_checked")
.HasColumnOrder(9)
.HasComment("Флаг, указывающий, что сущность был проверен и не требует автоматической перезаписи");
.HasComment("Проверено?");
b.Property<bool?>("IsLegacy")
.HasColumnType("boolean")
.HasColumnName("is_legacy")
.HasColumnOrder(10)
.HasComment("Устаревшая?");
b.Property<bool?>("IsTranslated")
.HasColumnType("boolean")
.HasColumnName("is_translated")
.HasColumnOrder(8)
.HasComment("Флаг, указывающий, что у сущности существует перевод");
.HasComment("Есть перевод?");
b.Property<string>("Name")
.IsRequired()
@@ -887,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")