12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace WCS.Service.Migrations
- {
- public partial class _21041406 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn<DateTime>(
- name: "FRAME",
- table: "WCS_BCRDATA",
- type: "datetime2",
- nullable: false,
- defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
- migrationBuilder.AddColumn<bool>(
- name: "ISLAST",
- table: "WCS_BCRDATA",
- type: "bit",
- nullable: false,
- defaultValue: false);
- migrationBuilder.AddColumn<int>(
- 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");
- }
- }
- }
|