proposal-system/api/src/ProposalSystem.Infrastructure/Data/Migrations/20260522000000_AddPoNumber.cs

49 lines
1.5 KiB
C#
Raw Normal View History

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ProposalSystem.Infrastructure.Data.Migrations
{
/// <inheritdoc />
public partial class AddPoNumber : Migration
{
private static readonly Guid AmazonCustomerId = Guid.Parse("a1b2c3d4-0000-0000-0000-000000000001");
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "PoNumber",
table: "Proposals",
type: "text",
nullable: true);
migrationBuilder.InsertData(
table: "Customers",
columns: new[] { "Id", "Name", "Addresses", "CreatedAt", "UpdatedAt" },
values: new object[]
{
AmazonCustomerId,
"Amazon Services, LLC",
null,
new DateTime(2026, 5, 22, 0, 0, 0, DateTimeKind.Utc),
new DateTime(2026, 5, 22, 0, 0, 0, DateTimeKind.Utc),
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Customers",
keyColumn: "Id",
keyValue: AmazonCustomerId);
migrationBuilder.DropColumn(
name: "PoNumber",
table: "Proposals");
}
}
}