mirror of
https://github.com/Sea-Haven-Industries/proposal-system.git
synced 2026-10-01 01:13:14 +00:00
49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
|
|
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");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|