using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Nexus.Api.Migrations
{
    /// <inheritdoc />
    public partial class AddAgentTaskFields : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<bool>(
                name: "IsAgentTask",
                table: "Tasks",
                type: "boolean",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<string>(
                name: "ExpectedFrom",
                table: "Tasks",
                type: "character varying(60)",
                maxLength: 60,
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_Tasks_IsAgentTask",
                table: "Tasks",
                column: "IsAgentTask");

            migrationBuilder.CreateIndex(
                name: "IX_Tasks_ExpectedFrom",
                table: "Tasks",
                column: "ExpectedFrom");
        }

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

            migrationBuilder.DropIndex(
                name: "IX_Tasks_ExpectedFrom",
                table: "Tasks");

            migrationBuilder.DropColumn(
                name: "ExpectedFrom",
                table: "Tasks");

            migrationBuilder.DropColumn(
                name: "IsAgentTask",
                table: "Tasks");
        }
    }
}
