Add EF migration for CopytradingScores
This commit is contained in:
Generated
+1097
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,206 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Predictalytics.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddCopytradingScores : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CopytradingCopyabilityScore",
|
||||
table: "TraderScores");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CopytradingQualityScore",
|
||||
table: "TraderScores");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CopytradingScore",
|
||||
table: "TraderScores");
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "VolumeScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(5,2)",
|
||||
precision: 5,
|
||||
scale: 2,
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(8,4)",
|
||||
oldPrecision: 8,
|
||||
oldScale: 4);
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "TimingScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(5,2)",
|
||||
precision: 5,
|
||||
scale: 2,
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(8,4)",
|
||||
oldPrecision: 8,
|
||||
oldScale: 4);
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "QualityScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(5,2)",
|
||||
precision: 5,
|
||||
scale: 2,
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(8,4)",
|
||||
oldPrecision: 8,
|
||||
oldScale: 4);
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "CombinedScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(5,2)",
|
||||
precision: 5,
|
||||
scale: 2,
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(8,4)",
|
||||
oldPrecision: 8,
|
||||
oldScale: 4);
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "ActivityScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(5,2)",
|
||||
precision: 5,
|
||||
scale: 2,
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(8,4)",
|
||||
oldPrecision: 8,
|
||||
oldScale: 4);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "CopytradingCopyabilityScore",
|
||||
table: "TraderAnalytics",
|
||||
type: "decimal(65,30)",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "CopytradingQualityScore",
|
||||
table: "TraderAnalytics",
|
||||
type: "decimal(65,30)",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "CopytradingScore",
|
||||
table: "TraderAnalytics",
|
||||
type: "decimal(65,30)",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CopytradingCopyabilityScore",
|
||||
table: "TraderAnalytics");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CopytradingQualityScore",
|
||||
table: "TraderAnalytics");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CopytradingScore",
|
||||
table: "TraderAnalytics");
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "VolumeScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(8,4)",
|
||||
precision: 8,
|
||||
scale: 4,
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(5,2)",
|
||||
oldPrecision: 5,
|
||||
oldScale: 2);
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "TimingScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(8,4)",
|
||||
precision: 8,
|
||||
scale: 4,
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(5,2)",
|
||||
oldPrecision: 5,
|
||||
oldScale: 2);
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "QualityScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(8,4)",
|
||||
precision: 8,
|
||||
scale: 4,
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(5,2)",
|
||||
oldPrecision: 5,
|
||||
oldScale: 2);
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "CombinedScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(8,4)",
|
||||
precision: 8,
|
||||
scale: 4,
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(5,2)",
|
||||
oldPrecision: 5,
|
||||
oldScale: 2);
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "ActivityScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(8,4)",
|
||||
precision: 8,
|
||||
scale: 4,
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(5,2)",
|
||||
oldPrecision: 5,
|
||||
oldScale: 2);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "CopytradingCopyabilityScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(65,30)",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "CopytradingQualityScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(65,30)",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "CopytradingScore",
|
||||
table: "TraderScores",
|
||||
type: "decimal(8,4)",
|
||||
precision: 8,
|
||||
scale: 4,
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -629,6 +629,15 @@ namespace Predictalytics.Infrastructure.Migrations
|
||||
b.Property<int>("TraderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("CopytradingCopyabilityScore")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<decimal>("CopytradingQualityScore")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<decimal>("CopytradingScore")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<decimal>("CurrentBalance")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
@@ -805,43 +814,33 @@ namespace Predictalytics.Infrastructure.Migrations
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<decimal>("ActivityScore")
|
||||
.HasPrecision(8, 4)
|
||||
.HasColumnType("decimal(8,4)");
|
||||
.HasPrecision(5, 2)
|
||||
.HasColumnType("decimal(5,2)");
|
||||
|
||||
b.Property<DateTime>("CalculatedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<decimal>("CombinedScore")
|
||||
.HasPrecision(8, 4)
|
||||
.HasColumnType("decimal(8,4)");
|
||||
|
||||
b.Property<decimal>("CopytradingCopyabilityScore")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<decimal>("CopytradingQualityScore")
|
||||
.HasColumnType("decimal(65,30)");
|
||||
|
||||
b.Property<decimal>("CopytradingScore")
|
||||
.HasPrecision(8, 4)
|
||||
.HasColumnType("decimal(8,4)");
|
||||
.HasPrecision(5, 2)
|
||||
.HasColumnType("decimal(5,2)");
|
||||
|
||||
b.Property<decimal>("QualityScore")
|
||||
.HasPrecision(8, 4)
|
||||
.HasColumnType("decimal(8,4)");
|
||||
.HasPrecision(5, 2)
|
||||
.HasColumnType("decimal(5,2)");
|
||||
|
||||
b.Property<int>("Rank")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TimingScore")
|
||||
.HasPrecision(8, 4)
|
||||
.HasColumnType("decimal(8,4)");
|
||||
.HasPrecision(5, 2)
|
||||
.HasColumnType("decimal(5,2)");
|
||||
|
||||
b.Property<int>("TraderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("VolumeScore")
|
||||
.HasPrecision(8, 4)
|
||||
.HasColumnType("decimal(8,4)");
|
||||
.HasPrecision(5, 2)
|
||||
.HasColumnType("decimal(5,2)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user