w4c-workflows-api/Data/Migrations/20260828150443_AddSagaCompensation.cs

57 lines
1.6 KiB
C#
Raw Normal View History

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace w4c_workflows.Data.Migrations
{
/// <inheritdoc />
public partial class AddSagaCompensation : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "CompensationPlanJson",
schema: "workflows",
table: "WorkflowRuns",
type: "jsonb",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsCompensation",
schema: "workflows",
table: "TaskRuns",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<DateTime>(
name: "NextAttemptAt",
schema: "workflows",
table: "TaskRuns",
type: "timestamp with time zone",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CompensationPlanJson",
schema: "workflows",
table: "WorkflowRuns");
migrationBuilder.DropColumn(
name: "IsCompensation",
schema: "workflows",
table: "TaskRuns");
migrationBuilder.DropColumn(
name: "NextAttemptAt",
schema: "workflows",
table: "TaskRuns");
}
}
}