using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace 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); } } }