using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Data.SeaHavenIndustries.Migrations { /// public partial class AddDispatchSignoffs : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "DispatchSignoffs", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DispatchId = table.Column(type: "int", nullable: false), SignoffType = table.Column(type: "nvarchar(max)", nullable: true), Name = table.Column(type: "nvarchar(max)", nullable: true), Signature = table.Column(type: "nvarchar(max)", nullable: true), SignatureMethod = table.Column(type: "nvarchar(max)", nullable: true), SignedAt = table.Column(type: "datetime2", nullable: true), IsDeleted = table.Column(type: "bit", nullable: true), createdby = table.Column(type: "nvarchar(max)", nullable: true), DeleterUserId = table.Column(type: "nvarchar(max)", nullable: true), DeletionTime = table.Column(type: "datetime2", nullable: true), CreatedDate = table.Column(type: "datetime2", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierUserId = table.Column(type: "int", nullable: true) }, constraints: table => { table.PrimaryKey("PK_DispatchSignoffs", x => x.Id); table.ForeignKey( name: "FK_DispatchSignoffs_Dispatches_DispatchId", column: x => x.DispatchId, principalTable: "Dispatches", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_DispatchSignoffs_DispatchId", table: "DispatchSignoffs", column: "DispatchId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "DispatchSignoffs"); } } }