20260306021000_AddRobotTaskContainerIdHotfix.cs 789 Bytes
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Rcs.Infrastructure.DB.MsSql;

#nullable disable

namespace Rcs.Infrastructure.Migrations
{
    [DbContext(typeof(AppDbContext))]
    [Migration("20260306021000_AddRobotTaskContainerIdHotfix")]
    public class AddRobotTaskContainerIdHotfix : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.Sql(@"
ALTER TABLE robot_tasks
    ADD COLUMN IF NOT EXISTS container_id character varying(50);
");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.Sql(@"
ALTER TABLE robot_tasks
    DROP COLUMN IF EXISTS container_id;
");
        }
    }
}