mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-03 09:13:30 +00:00
* fix(migrations): make Phase6 completion slide-over migration idempotent Use IF EXISTS / IF COL_LENGTH guards and explicit EF migration metadata so partial environments can apply Phase 6 safely. * feat(locations): add sites options endpoint and vendor contactName Expose GET /api/locations/sites for the WO create wizard and include vendor contactName on dropdown responses. * feat(work-orders): add structured service notes POC and vendor fields Persist primary/extra services, service notes, free-text POC, and tech/vendor notes on create/patch/board/detail instead of embedding them in description. * fix(work-orders): make stacked tip build for CI quality gates * fix(work-orders): align stacked services with CI build * fix(work-orders): keep FlagColor out of structured-notes slice Remove FlagColor model/API/tests from this PR so schema and EF model stay aligned with the structured-fields migration. FlagColor remains in the follow-on PR that adds its migration. --------- Co-authored-by: Arthur Bassi <arthur.winiarski.ranger@outlook.com>
121 lines
3.6 KiB
C#
121 lines
3.6 KiB
C#
using Data.SeaHavenIndustries;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Data.SeaHavenIndustries.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20260715160000_WoServiceNotesStructuredFields")]
|
|
public partial class WoServiceNotesStructuredFields : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "PocName",
|
|
table: "workOrders",
|
|
type: "nvarchar(200)",
|
|
maxLength: 200,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "PocPhone",
|
|
table: "workOrders",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "PocNotes",
|
|
table: "workOrders",
|
|
type: "nvarchar(2000)",
|
|
maxLength: 2000,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ExtraServices",
|
|
table: "workOrders",
|
|
type: "nvarchar(2000)",
|
|
maxLength: 2000,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ServiceNotes",
|
|
table: "workOrders",
|
|
type: "nvarchar(4000)",
|
|
maxLength: 4000,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "TechPhone",
|
|
table: "workOrders",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "VendorNotes",
|
|
table: "workOrders",
|
|
type: "nvarchar(2000)",
|
|
maxLength: 2000,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "TechPhone",
|
|
table: "Dispatches",
|
|
type: "nvarchar(50)",
|
|
maxLength: 50,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "VendorNotes",
|
|
table: "Dispatches",
|
|
type: "nvarchar(2000)",
|
|
maxLength: 2000,
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "PocName",
|
|
table: "workOrders");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PocPhone",
|
|
table: "workOrders");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PocNotes",
|
|
table: "workOrders");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ExtraServices",
|
|
table: "workOrders");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ServiceNotes",
|
|
table: "workOrders");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "TechPhone",
|
|
table: "workOrders");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "VendorNotes",
|
|
table: "workOrders");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "TechPhone",
|
|
table: "Dispatches");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "VendorNotes",
|
|
table: "Dispatches");
|
|
}
|
|
}
|
|
}
|