using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace MTWorkHR.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class altrOrderOverTimeAttach : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<long>(
                name: "OverTimeAttachmentId",
                table: "OverTimeDay",
                type: "bigint",
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_OverTimeDay_OverTimeAttachmentId",
                table: "OverTimeDay",
                column: "OverTimeAttachmentId");

            migrationBuilder.AddForeignKey(
                name: "FK_OverTimeDay_OrderAttachment_OverTimeAttachmentId",
                table: "OverTimeDay",
                column: "OverTimeAttachmentId",
                principalTable: "OrderAttachment",
                principalColumn: "Id");
        }

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

            migrationBuilder.DropIndex(
                name: "IX_OverTimeDay_OverTimeAttachmentId",
                table: "OverTimeDay");

            migrationBuilder.DropColumn(
                name: "OverTimeAttachmentId",
                table: "OverTimeDay");
        }
    }
}
