mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 06:03:12 +00:00
- Add DispatchNumber and CompletedDate to Dispatch model - Add DispatchId to Comments for per-dispatch vendor threads - GetDispatchById endpoint with vendor communication thread - UpdateDispatch endpoint for status, NTE, dates, description - AddDispatchComment endpoint — saves comment + sends email to vendor with sender name - BackfillDispatchNumbers endpoint for existing dispatches - SyncVendorReplies endpoint — pulls from DynamoDB VendorReplies table - Fix reply-to address to include dispatch number - Include sender name in dispatch and comment emails
70 lines
2.1 KiB
C#
70 lines
2.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Data.SeaHavenIndustries.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddDispatchNumberAndCommentDispatchId : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "CompletedDate",
|
|
table: "Dispatches",
|
|
type: "datetime2",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "DispatchNumber",
|
|
table: "Dispatches",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "DispatchId",
|
|
table: "Comments",
|
|
type: "int",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Comments_DispatchId",
|
|
table: "Comments",
|
|
column: "DispatchId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Comments_Dispatches_DispatchId",
|
|
table: "Comments",
|
|
column: "DispatchId",
|
|
principalTable: "Dispatches",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Comments_Dispatches_DispatchId",
|
|
table: "Comments");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Comments_DispatchId",
|
|
table: "Comments");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CompletedDate",
|
|
table: "Dispatches");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "DispatchNumber",
|
|
table: "Dispatches");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "DispatchId",
|
|
table: "Comments");
|
|
}
|
|
}
|
|
}
|