12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace WCS.Service.Migrations
- {
- public partial class _7124 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_WCS_PATH_WCS_DEVICE_STARTCODE",
- table: "WCS_PATH");
- migrationBuilder.AlterColumn<string>(
- name: "STARTCODE",
- table: "WCS_PATH",
- type: "nvarchar(50)",
- nullable: false,
- defaultValue: "",
- oldClrType: typeof(string),
- oldType: "nvarchar(50)",
- oldNullable: true);
- migrationBuilder.AddForeignKey(
- name: "FK_WCS_PATH_WCS_DEVICE_STARTCODE",
- table: "WCS_PATH",
- column: "STARTCODE",
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Cascade);
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_WCS_PATH_WCS_DEVICE_STARTCODE",
- table: "WCS_PATH");
- migrationBuilder.AlterColumn<string>(
- name: "STARTCODE",
- table: "WCS_PATH",
- type: "nvarchar(50)",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(50)");
- migrationBuilder.AddForeignKey(
- name: "FK_WCS_PATH_WCS_DEVICE_STARTCODE",
- table: "WCS_PATH",
- column: "STARTCODE",
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- }
- }
- }
|