using System; using Microsoft.EntityFrameworkCore.Migrations; namespace WCS.Service.Migrations { public partial class _21041406 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "FRAME", table: "WCS_BCRDATA", type: "datetime2", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.AddColumn( name: "ISLAST", table: "WCS_BCRDATA", type: "bit", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "PROTOCOLID", table: "WCS_BCRDATA", type: "int", nullable: true); migrationBuilder.CreateIndex( name: "IX_WCS_BCRDATA_PROTOCOLID", table: "WCS_BCRDATA", column: "PROTOCOLID"); migrationBuilder.AddForeignKey( name: "FK_WCS_BCRDATA_WCS_DEVICEITEM_PROTOCOLID", table: "WCS_BCRDATA", column: "PROTOCOLID", principalTable: "WCS_DEVICEITEM", principalColumn: "ID", onDelete: ReferentialAction.Restrict); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_WCS_BCRDATA_WCS_DEVICEITEM_PROTOCOLID", table: "WCS_BCRDATA"); migrationBuilder.DropIndex( name: "IX_WCS_BCRDATA_PROTOCOLID", table: "WCS_BCRDATA"); migrationBuilder.DropColumn( name: "FRAME", table: "WCS_BCRDATA"); migrationBuilder.DropColumn( name: "ISLAST", table: "WCS_BCRDATA"); migrationBuilder.DropColumn( name: "PROTOCOLID", table: "WCS_BCRDATA"); } } }