Add migrations for agent table
This commit is contained in:
1455
src/Managing.Infrastructure.Database/Migrations/20251002185941_UpdateAgentSummaryEntityIndexes.Designer.cs
generated
Normal file
1455
src/Managing.Infrastructure.Database/Migrations/20251002185941_UpdateAgentSummaryEntityIndexes.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,77 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Managing.Infrastructure.Databases.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class UpdateAgentSummaryEntityIndexes : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_AgentSummaries_AgentName",
|
||||||
|
table: "AgentSummaries");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<decimal>(
|
||||||
|
name: "TotalFees",
|
||||||
|
table: "AgentSummaries",
|
||||||
|
type: "numeric(18,8)",
|
||||||
|
precision: 18,
|
||||||
|
scale: 8,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(decimal),
|
||||||
|
oldType: "numeric");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<decimal>(
|
||||||
|
name: "NetPnL",
|
||||||
|
table: "AgentSummaries",
|
||||||
|
type: "numeric(18,8)",
|
||||||
|
precision: 18,
|
||||||
|
scale: 8,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(decimal),
|
||||||
|
oldType: "numeric");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AgentSummaries_AgentName",
|
||||||
|
table: "AgentSummaries",
|
||||||
|
column: "AgentName",
|
||||||
|
unique: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_AgentSummaries_AgentName",
|
||||||
|
table: "AgentSummaries");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<decimal>(
|
||||||
|
name: "TotalFees",
|
||||||
|
table: "AgentSummaries",
|
||||||
|
type: "numeric",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(decimal),
|
||||||
|
oldType: "numeric(18,8)",
|
||||||
|
oldPrecision: 18,
|
||||||
|
oldScale: 8);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<decimal>(
|
||||||
|
name: "NetPnL",
|
||||||
|
table: "AgentSummaries",
|
||||||
|
type: "numeric",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(decimal),
|
||||||
|
oldType: "numeric(18,8)",
|
||||||
|
oldPrecision: 18,
|
||||||
|
oldScale: 8);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AgentSummaries_AgentName",
|
||||||
|
table: "AgentSummaries",
|
||||||
|
column: "AgentName");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -96,7 +96,8 @@ namespace Managing.Infrastructure.Databases.Migrations
|
|||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<decimal>("NetPnL")
|
b.Property<decimal>("NetPnL")
|
||||||
.HasColumnType("numeric");
|
.HasPrecision(18, 8)
|
||||||
|
.HasColumnType("numeric(18,8)");
|
||||||
|
|
||||||
b.Property<DateTime?>("Runtime")
|
b.Property<DateTime?>("Runtime")
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("timestamp with time zone");
|
||||||
@@ -106,7 +107,8 @@ namespace Managing.Infrastructure.Databases.Migrations
|
|||||||
.HasColumnType("numeric(18,8)");
|
.HasColumnType("numeric(18,8)");
|
||||||
|
|
||||||
b.Property<decimal>("TotalFees")
|
b.Property<decimal>("TotalFees")
|
||||||
.HasColumnType("numeric");
|
.HasPrecision(18, 8)
|
||||||
|
.HasColumnType("numeric(18,8)");
|
||||||
|
|
||||||
b.Property<decimal>("TotalPnL")
|
b.Property<decimal>("TotalPnL")
|
||||||
.HasColumnType("decimal(18,8)");
|
.HasColumnType("decimal(18,8)");
|
||||||
@@ -129,7 +131,8 @@ namespace Managing.Infrastructure.Databases.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("AgentName");
|
b.HasIndex("AgentName")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
b.HasIndex("TotalPnL");
|
b.HasIndex("TotalPnL");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user