feat(dal,api): добавлен индекс в таблицу UnitInValues. В api изменены респонсы Template и Unit.
This commit is contained in:
3967
PARR.DAL/Migrations/20251121002115_tbkUnitInValueAddIndexes.Designer.cs
generated
Normal file
3967
PARR.DAL/Migrations/20251121002115_tbkUnitInValueAddIndexes.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class tbkUnitInValueAddIndexes : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_UnitInValues_FieldId",
|
||||
schema: "unit",
|
||||
table: "UnitInValues");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_UnitInValues_FieldId_ValueId",
|
||||
schema: "unit",
|
||||
table: "UnitInValues",
|
||||
columns: new[] { "FieldId", "ValueId" });
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_UnitInValues_FieldId_ValueId",
|
||||
schema: "unit",
|
||||
table: "UnitInValues");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_UnitInValues_FieldId",
|
||||
schema: "unit",
|
||||
table: "UnitInValues",
|
||||
column: "FieldId");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2980,10 +2980,10 @@ namespace PARR.DAL.Migrations
|
||||
|
||||
b.HasKey("UnitId", "FieldId", "ValueId");
|
||||
|
||||
b.HasIndex("FieldId");
|
||||
|
||||
b.HasIndex("ValueId");
|
||||
|
||||
b.HasIndex("FieldId", "ValueId");
|
||||
|
||||
b.ToTable("UnitInValues", "unit", t =>
|
||||
{
|
||||
t.HasComment("Таблица связи ЭК с полями и со значениями");
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace PARR.DAL.Models.Unit
|
||||
[Table("UnitInValues", Schema = DataContextSettings.Unit)]
|
||||
[Comment("Таблица связи ЭК с полями и со значениями")]
|
||||
[PrimaryKey(nameof(UnitId), nameof(FieldId), nameof(ValueId))]
|
||||
[Index(nameof(FieldId), nameof(ValueId))]
|
||||
public class UnitInValue : IBaseDateModified, IBaseDateCreated
|
||||
{
|
||||
public Guid UnitId { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user