Add Heimdall patron support intake

This commit is contained in:
Meta Vens 2026-06-09 17:16:27 +01:00
commit bb1b1056be
21 changed files with 625 additions and 13 deletions

View file

@ -0,0 +1,75 @@
using Bifrost.Web.Domain;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bifrost.Web.Data.Migrations
{
[Migration("20260609160000_AddExternalPatronProviderIntake")]
public partial class AddExternalPatronProviderIntake : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Provider",
table: "PatronSupportEvents",
type: "text",
nullable: false,
defaultValue: nameof(ExternalPatronProvider.Manual));
migrationBuilder.AddColumn<string>(
name: "ProviderEventId",
table: "PatronSupportEvents",
type: "character varying(240)",
maxLength: 240,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ProviderPayerId",
table: "PatronSupportEvents",
type: "character varying(240)",
maxLength: 240,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ProviderSubscriptionId",
table: "PatronSupportEvents",
type: "character varying(240)",
maxLength: 240,
nullable: false,
defaultValue: "");
migrationBuilder.CreateIndex(
name: "IX_PatronSupportEvents_Provider_ProviderEventId",
table: "PatronSupportEvents",
columns: new[] { "Provider", "ProviderEventId" },
unique: true,
filter: "\"ProviderEventId\" <> ''");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_PatronSupportEvents_Provider_ProviderEventId",
table: "PatronSupportEvents");
migrationBuilder.DropColumn(
name: "Provider",
table: "PatronSupportEvents");
migrationBuilder.DropColumn(
name: "ProviderEventId",
table: "PatronSupportEvents");
migrationBuilder.DropColumn(
name: "ProviderPayerId",
table: "PatronSupportEvents");
migrationBuilder.DropColumn(
name: "ProviderSubscriptionId",
table: "PatronSupportEvents");
}
}
}