123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace WCS.Service.Migrations
- {
- public partial class _7203 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn<string>(
- name: "DEVICECODE",
- table: "WCS_RobotStation",
- type: "nvarchar(50)",
- nullable: true);
- migrationBuilder.AddColumn<DateTime>(
- name: "FRAME",
- table: "WCS_RobotStation",
- type: "datetime2",
- nullable: false,
- defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
- migrationBuilder.AddColumn<bool>(
- name: "ISLAST",
- table: "WCS_RobotStation",
- type: "bit",
- nullable: false,
- defaultValue: false);
- migrationBuilder.AddColumn<int>(
- name: "WCSVERSION",
- table: "WCS_RobotStation",
- type: "int",
- nullable: false,
- defaultValue: 0);
- migrationBuilder.AddColumn<string>(
- name: "DEVICECODE",
- table: "WCS_Robot",
- type: "nvarchar(50)",
- nullable: true);
- migrationBuilder.AddColumn<DateTime>(
- name: "FRAME",
- table: "WCS_Robot",
- type: "datetime2",
- nullable: false,
- defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
- migrationBuilder.AddColumn<bool>(
- name: "ISLAST",
- table: "WCS_Robot",
- type: "bit",
- nullable: false,
- defaultValue: false);
- migrationBuilder.AddColumn<int>(
- name: "WCSVERSION",
- table: "WCS_Robot",
- type: "int",
- nullable: false,
- defaultValue: 0);
- migrationBuilder.CreateIndex(
- name: "IX_WCS_RobotStation_DEVICECODE",
- table: "WCS_RobotStation",
- column: "DEVICECODE");
- migrationBuilder.CreateIndex(
- name: "IX_WCS_Robot_DEVICECODE",
- table: "WCS_Robot",
- column: "DEVICECODE");
- migrationBuilder.AddForeignKey(
- name: "FK_WCS_Robot_WCS_DEVICE_DEVICECODE",
- table: "WCS_Robot",
- column: "DEVICECODE",
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- migrationBuilder.AddForeignKey(
- name: "FK_WCS_RobotStation_WCS_DEVICE_DEVICECODE",
- table: "WCS_RobotStation",
- column: "DEVICECODE",
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_WCS_Robot_WCS_DEVICE_DEVICECODE",
- table: "WCS_Robot");
- migrationBuilder.DropForeignKey(
- name: "FK_WCS_RobotStation_WCS_DEVICE_DEVICECODE",
- table: "WCS_RobotStation");
- migrationBuilder.DropIndex(
- name: "IX_WCS_RobotStation_DEVICECODE",
- table: "WCS_RobotStation");
- migrationBuilder.DropIndex(
- name: "IX_WCS_Robot_DEVICECODE",
- table: "WCS_Robot");
- migrationBuilder.DropColumn(
- name: "DEVICECODE",
- table: "WCS_RobotStation");
- migrationBuilder.DropColumn(
- name: "FRAME",
- table: "WCS_RobotStation");
- migrationBuilder.DropColumn(
- name: "ISLAST",
- table: "WCS_RobotStation");
- migrationBuilder.DropColumn(
- name: "WCSVERSION",
- table: "WCS_RobotStation");
- migrationBuilder.DropColumn(
- name: "DEVICECODE",
- table: "WCS_Robot");
- migrationBuilder.DropColumn(
- name: "FRAME",
- table: "WCS_Robot");
- migrationBuilder.DropColumn(
- name: "ISLAST",
- table: "WCS_Robot");
- migrationBuilder.DropColumn(
- name: "WCSVERSION",
- table: "WCS_Robot");
- }
- }
- }
|