using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PowderCoating.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class AddPerformanceIndexes : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 1,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 5, 0, 33, 47, 286, DateTimeKind.Utc).AddTicks(2744));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 2,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 5, 0, 33, 47, 286, DateTimeKind.Utc).AddTicks(2750));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 3,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 5, 0, 33, 47, 286, DateTimeKind.Utc).AddTicks(2752));

            migrationBuilder.CreateIndex(
                name: "IX_InventoryTransactions_TransactionType_TransactionDate",
                table: "InventoryTransactions",
                columns: new[] { "TransactionType", "TransactionDate" });

            migrationBuilder.CreateIndex(
                name: "IX_InventoryItems_CompanyId_IsActive",
                table: "InventoryItems",
                columns: new[] { "CompanyId", "IsActive" });

            migrationBuilder.CreateIndex(
                name: "IX_InventoryItems_IsActive",
                table: "InventoryItems",
                column: "IsActive");

            migrationBuilder.CreateIndex(
                name: "IX_Bills_CompanyId_Status",
                table: "Bills",
                columns: new[] { "CompanyId", "Status" });

            migrationBuilder.CreateIndex(
                name: "IX_Bills_DueDate",
                table: "Bills",
                column: "DueDate");

            migrationBuilder.CreateIndex(
                name: "IX_Bills_Status",
                table: "Bills",
                column: "Status");

            migrationBuilder.CreateIndex(
                name: "IX_Appointments_ScheduledStartTime",
                table: "Appointments",
                column: "ScheduledStartTime");
        }

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

            migrationBuilder.DropIndex(
                name: "IX_InventoryItems_CompanyId_IsActive",
                table: "InventoryItems");

            migrationBuilder.DropIndex(
                name: "IX_InventoryItems_IsActive",
                table: "InventoryItems");

            migrationBuilder.DropIndex(
                name: "IX_Bills_CompanyId_Status",
                table: "Bills");

            migrationBuilder.DropIndex(
                name: "IX_Bills_DueDate",
                table: "Bills");

            migrationBuilder.DropIndex(
                name: "IX_Bills_Status",
                table: "Bills");

            migrationBuilder.DropIndex(
                name: "IX_Appointments_ScheduledStartTime",
                table: "Appointments");

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 1,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 4, 19, 41, 22, 854, DateTimeKind.Utc).AddTicks(290));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 2,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 4, 19, 41, 22, 854, DateTimeKind.Utc).AddTicks(296));

            migrationBuilder.UpdateData(
                table: "PricingTiers",
                keyColumn: "Id",
                keyValue: 3,
                column: "CreatedAt",
                value: new DateTime(2026, 4, 4, 19, 41, 22, 854, DateTimeKind.Utc).AddTicks(297));
        }
    }
}
