using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace WorkFlowCheck.DL.Migrations
{
    /// <inheritdoc />
    public partial class Extend017 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "AcceptUserId",
                table: "CheckListHeader",
                type: "int",
                nullable: true);

            migrationBuilder.UpdateData(
                table: "Users",
                keyColumn: "Id",
                keyValue: 1,
                columns: new[] { "CreatedAt", "LastModAt" },
                values: new object[] { new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(149), new DateTime(2025, 4, 8, 6, 55, 14, 155, DateTimeKind.Utc).AddTicks(150) });

            migrationBuilder.UpdateData(
                table: "Users",
                keyColumn: "Id",
                keyValue: 2,
                columns: new[] { "CreatedAt", "LastModAt" },
                values: new object[] { new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5847), new DateTime(2025, 4, 8, 6, 55, 14, 166, DateTimeKind.Utc).AddTicks(5849) });

            migrationBuilder.CreateIndex(
                name: "IX_CheckListHeader_AcceptUserId",
                table: "CheckListHeader",
                column: "AcceptUserId");

            migrationBuilder.AddForeignKey(
                name: "FK_CheckListHeader_Users_AcceptUserId",
                table: "CheckListHeader",
                column: "AcceptUserId",
                principalTable: "Users",
                principalColumn: "Id");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_CheckListHeader_Users_AcceptUserId",
                table: "CheckListHeader");

            migrationBuilder.DropIndex(
                name: "IX_CheckListHeader_AcceptUserId",
                table: "CheckListHeader");

            migrationBuilder.DropColumn(
                name: "AcceptUserId",
                table: "CheckListHeader");

            migrationBuilder.UpdateData(
                table: "Users",
                keyColumn: "Id",
                keyValue: 1,
                columns: new[] { "CreatedAt", "LastModAt" },
                values: new object[] { new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2145), new DateTime(2025, 4, 6, 19, 24, 51, 944, DateTimeKind.Utc).AddTicks(2148) });

            migrationBuilder.UpdateData(
                table: "Users",
                keyColumn: "Id",
                keyValue: 2,
                columns: new[] { "CreatedAt", "LastModAt" },
                values: new object[] { new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5191), new DateTime(2025, 4, 6, 19, 24, 51, 956, DateTimeKind.Utc).AddTicks(5194) });
        }
    }
}
