using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Managing.Infrastructure.Databases.Migrations
{
    /// <inheritdoc />
    public partial class RemoveAccountNameFromPositions : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Fee",
                table: "Trades");

            migrationBuilder.DropColumn(
                name: "AccountName",
                table: "Positions");

            migrationBuilder.AddColumn<decimal>(
                name: "GasFees",
                table: "Positions",
                type: "numeric(18,8)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "UiFees",
                table: "Positions",
                type: "numeric(18,8)",
                nullable: false,
                defaultValue: 0m);
        }

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

            migrationBuilder.DropColumn(
                name: "UiFees",
                table: "Positions");

            migrationBuilder.AddColumn<decimal>(
                name: "Fee",
                table: "Trades",
                type: "numeric(18,8)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<string>(
                name: "AccountName",
                table: "Positions",
                type: "character varying(255)",
                maxLength: 255,
                nullable: false,
                defaultValue: "");
        }
    }
}
