using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PolyTrader.Modules.CopyTrading.Persistence.Ef.Migrations
{
    /// <inheritdoc />
    public partial class AddTraderCopyScore : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<decimal>(
                name: "CopyAvgPnlPerTrade",
                table: "mod_copytrading_traders",
                type: "decimal(18,6)",
                precision: 18,
                scale: 6,
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "CopyPnl30d",
                table: "mod_copytrading_traders",
                type: "decimal(18,6)",
                precision: 18,
                scale: 6,
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "CopyProfitFactor",
                table: "mod_copytrading_traders",
                type: "decimal(18,6)",
                precision: 18,
                scale: 6,
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<int>(
                name: "CopyTradeCount30d",
                table: "mod_copytrading_traders",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CopyAvgPnlPerTrade",
                table: "mod_copytrading_traders");

            migrationBuilder.DropColumn(
                name: "CopyPnl30d",
                table: "mod_copytrading_traders");

            migrationBuilder.DropColumn(
                name: "CopyProfitFactor",
                table: "mod_copytrading_traders");

            migrationBuilder.DropColumn(
                name: "CopyTradeCount30d",
                table: "mod_copytrading_traders");
        }
    }
}
