| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 | using Microsoft.EntityFrameworkCore.Migrations;#nullable disablenamespace WCS.Service.Migrations{    public partial class _5 : Migration    {        protected override void Up(MigrationBuilder migrationBuilder)        {            migrationBuilder.DropForeignKey(                name: "FK_WCS_DEVICEGROUP_WCS_DEVICE_GROUPCODE",                table: "WCS_DEVICEGROUP");            migrationBuilder.DropForeignKey(                name: "FK_WCS_DEVICEGROUP_WCS_DEVICE_MEMBERCODE",                table: "WCS_DEVICEGROUP");            migrationBuilder.DropPrimaryKey(                name: "PK_WCS_DEVICEGROUP",                table: "WCS_DEVICEGROUP");            migrationBuilder.RenameTable(                name: "WCS_DEVICEGROUP",                newName: "WCS_GROUPMEMBER");            migrationBuilder.RenameIndex(                name: "IX_WCS_DEVICEGROUP_MEMBERCODE",                table: "WCS_GROUPMEMBER",                newName: "IX_WCS_GROUPMEMBER_MEMBERCODE");            migrationBuilder.RenameIndex(                name: "IX_WCS_DEVICEGROUP_GROUPCODE",                table: "WCS_GROUPMEMBER",                newName: "IX_WCS_GROUPMEMBER_GROUPCODE");            migrationBuilder.AddPrimaryKey(                name: "PK_WCS_GROUPMEMBER",                table: "WCS_GROUPMEMBER",                column: "ID");            migrationBuilder.AddForeignKey(                name: "FK_WCS_GROUPMEMBER_WCS_DEVICE_GROUPCODE",                table: "WCS_GROUPMEMBER",                column: "GROUPCODE",                principalTable: "WCS_DEVICE",                principalColumn: "CODE",                onDelete: ReferentialAction.Restrict);            migrationBuilder.AddForeignKey(                name: "FK_WCS_GROUPMEMBER_WCS_DEVICE_MEMBERCODE",                table: "WCS_GROUPMEMBER",                column: "MEMBERCODE",                principalTable: "WCS_DEVICE",                principalColumn: "CODE",                onDelete: ReferentialAction.Restrict);        }        protected override void Down(MigrationBuilder migrationBuilder)        {            migrationBuilder.DropForeignKey(                name: "FK_WCS_GROUPMEMBER_WCS_DEVICE_GROUPCODE",                table: "WCS_GROUPMEMBER");            migrationBuilder.DropForeignKey(                name: "FK_WCS_GROUPMEMBER_WCS_DEVICE_MEMBERCODE",                table: "WCS_GROUPMEMBER");            migrationBuilder.DropPrimaryKey(                name: "PK_WCS_GROUPMEMBER",                table: "WCS_GROUPMEMBER");            migrationBuilder.RenameTable(                name: "WCS_GROUPMEMBER",                newName: "WCS_DEVICEGROUP");            migrationBuilder.RenameIndex(                name: "IX_WCS_GROUPMEMBER_MEMBERCODE",                table: "WCS_DEVICEGROUP",                newName: "IX_WCS_DEVICEGROUP_MEMBERCODE");            migrationBuilder.RenameIndex(                name: "IX_WCS_GROUPMEMBER_GROUPCODE",                table: "WCS_DEVICEGROUP",                newName: "IX_WCS_DEVICEGROUP_GROUPCODE");            migrationBuilder.AddPrimaryKey(                name: "PK_WCS_DEVICEGROUP",                table: "WCS_DEVICEGROUP",                column: "ID");            migrationBuilder.AddForeignKey(                name: "FK_WCS_DEVICEGROUP_WCS_DEVICE_GROUPCODE",                table: "WCS_DEVICEGROUP",                column: "GROUPCODE",                principalTable: "WCS_DEVICE",                principalColumn: "CODE",                onDelete: ReferentialAction.Restrict);            migrationBuilder.AddForeignKey(                name: "FK_WCS_DEVICEGROUP_WCS_DEVICE_MEMBERCODE",                table: "WCS_DEVICEGROUP",                column: "MEMBERCODE",                principalTable: "WCS_DEVICE",                principalColumn: "CODE",                onDelete: ReferentialAction.Restrict);        }    }}
 |