48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace NKC.Data.Migrations
|
|
{
|
|
public partial class AddMovMagTable : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "MovMag",
|
|
columns: table => new
|
|
{
|
|
MovID = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
DtRec = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
RemnID = table.Column<int>(type: "int", nullable: false),
|
|
QtyRec = table.Column<int>(type: "int", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_MovMag", x => x.MovID);
|
|
table.ForeignKey(
|
|
name: "FK_MovMag_RemnantsList_RemnID",
|
|
column: x => x.RemnID,
|
|
principalTable: "RemnantsList",
|
|
principalColumn: "RemnID",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_MovMag_RemnID",
|
|
table: "MovMag",
|
|
column: "RemnID");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "MovMag");
|
|
|
|
}
|
|
}
|
|
}
|