using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PARR.DAL.Migrations
{
    /// <inheritdoc />
    public partial class tblRobotHistoryAddIndex : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_RobotHistories_HistoryLevel",
                table: "RobotHistories");

            migrationBuilder.DropIndex(
                name: "IX_RobotHistories_RobotConfigurationId",
                table: "RobotHistories");

            migrationBuilder.CreateIndex(
                name: "IX_RobotHistories_HistoryLevel_DateCreated",
                table: "RobotHistories",
                columns: new[] { "HistoryLevel", "DateCreated" },
                descending: new[] { false, true });

            migrationBuilder.CreateIndex(
                name: "IX_RobotHistories_RobotConfigurationId_DateCreated",
                table: "RobotHistories",
                columns: new[] { "RobotConfigurationId", "DateCreated" });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_RobotHistories_HistoryLevel_DateCreated",
                table: "RobotHistories");

            migrationBuilder.DropIndex(
                name: "IX_RobotHistories_RobotConfigurationId_DateCreated",
                table: "RobotHistories");

            migrationBuilder.CreateIndex(
                name: "IX_RobotHistories_HistoryLevel",
                table: "RobotHistories",
                column: "HistoryLevel");

            migrationBuilder.CreateIndex(
                name: "IX_RobotHistories_RobotConfigurationId",
                table: "RobotHistories",
                column: "RobotConfigurationId");
        }
    }
}
