Работа с правилами
This commit is contained in:
+18
-7
@@ -13,7 +13,7 @@ using Pf2eModel.Model.Enum;
|
||||
namespace Pf2eModel.Migrations
|
||||
{
|
||||
[DbContext(typeof(Pf2eDbContext))]
|
||||
[Migration("20250507112626_1")]
|
||||
[Migration("20250508101742_1")]
|
||||
partial class _1
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -236,22 +236,30 @@ namespace Pf2eModel.Migrations
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Base.Source.EntitySource", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("EntityId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("entity_id")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<int>("SourceId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("source_id")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<bool>("IsRemaster")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_remaster")
|
||||
.HasColumnOrder(4)
|
||||
.HasComment("Флаг, указывающий, что объект является частью ремастера");
|
||||
|
||||
b.Property<int>("SourceId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("source_id")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<string>("Suffix")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
@@ -260,9 +268,12 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("Номер страницы, эррата и т.д.");
|
||||
|
||||
b.HasKey("EntityId", "SourceId")
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_entity_sources");
|
||||
|
||||
b.HasIndex("EntityId")
|
||||
.HasDatabaseName("ix_entity_sources_entity_id");
|
||||
|
||||
b.HasIndex("SourceId")
|
||||
.HasDatabaseName("ix_entity_sources_source_id");
|
||||
|
||||
@@ -469,6 +469,8 @@ namespace Pf2eModel.Migrations
|
||||
name: "entity_sources",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
entity_id = table.Column<int>(type: "integer", nullable: false),
|
||||
source_id = table.Column<int>(type: "integer", nullable: false),
|
||||
suffix = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, comment: "Номер страницы, эррата и т.д."),
|
||||
@@ -476,7 +478,7 @@ namespace Pf2eModel.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_entity_sources", x => new { x.entity_id, x.source_id });
|
||||
table.PrimaryKey("pk_entity_sources", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_entity_sources_entities_entity_id",
|
||||
column: x => x.entity_id,
|
||||
@@ -1260,6 +1262,11 @@ namespace Pf2eModel.Migrations
|
||||
table: "entity_keyword",
|
||||
column: "keywords_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_entity_sources_entity_id",
|
||||
table: "entity_sources",
|
||||
column: "entity_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_entity_sources_source_id",
|
||||
table: "entity_sources",
|
||||
@@ -233,22 +233,30 @@ namespace Pf2eModel.Migrations
|
||||
|
||||
modelBuilder.Entity("Pf2eModel.Model.Base.Source.EntitySource", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id")
|
||||
.HasColumnOrder(0);
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("EntityId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("entity_id")
|
||||
.HasColumnOrder(1);
|
||||
|
||||
b.Property<int>("SourceId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("source_id")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<bool>("IsRemaster")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_remaster")
|
||||
.HasColumnOrder(4)
|
||||
.HasComment("Флаг, указывающий, что объект является частью ремастера");
|
||||
|
||||
b.Property<int>("SourceId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("source_id")
|
||||
.HasColumnOrder(2);
|
||||
|
||||
b.Property<string>("Suffix")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
@@ -257,9 +265,12 @@ namespace Pf2eModel.Migrations
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("Номер страницы, эррата и т.д.");
|
||||
|
||||
b.HasKey("EntityId", "SourceId")
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_entity_sources");
|
||||
|
||||
b.HasIndex("EntityId")
|
||||
.HasDatabaseName("ix_entity_sources_entity_id");
|
||||
|
||||
b.HasIndex("SourceId")
|
||||
.HasDatabaseName("ix_entity_sources_source_id");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user