proposal-system/api/src/ProposalSystem.Infrastructure/Data/Migrations/20260522000000_AddPoNumber.cs
Adam Moussa 9b502045dd Add site search, PO number, service category Other, and form enhancements
- Structured manual site entry with 5 separate address fields
- Site search via Autocomplete with server-side filtering
- Added PO number field to proposal form and AddPoNumber migration
- Added Other to ServiceCategory enum with custom category text input
- Label consistency: "Work Order #" → "Work Order Number", "PO Number"
- Top row reflow to 3-column layout (4/4/4)
- Dev PDF generation script for local testing
2026-05-27 18:17:48 -04:00

48 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");
}
}
}