Add OptimizationResultJson and OptimizedAt columns to Job table. JobService now saves/clears optimization results and auto-clears stale results when parts, stock, or cutting tool change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CutList.Web.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddJobOptimizationResult : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OptimizationResultJson",
|
|
table: "Jobs",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "OptimizedAt",
|
|
table: "Jobs",
|
|
type: "datetime2",
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "OptimizationResultJson",
|
|
table: "Jobs");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OptimizedAt",
|
|
table: "Jobs");
|
|
}
|
|
}
|
|
}
|