183 lines
6.1 KiB
C#
183 lines
6.1 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace LANCommander.Migrations
|
|
{
|
|
public partial class RekeyUsers : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Tags_CreatedById",
|
|
table: "Tags",
|
|
column: "CreatedById");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Tags_UpdatedById",
|
|
table: "Tags",
|
|
column: "UpdatedById");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Games_CreatedById",
|
|
table: "Games",
|
|
column: "CreatedById");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Games_UpdatedById",
|
|
table: "Games",
|
|
column: "UpdatedById");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Companies_CreatedById",
|
|
table: "Companies",
|
|
column: "CreatedById");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Companies_UpdatedById",
|
|
table: "Companies",
|
|
column: "UpdatedById");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Archive_CreatedById",
|
|
table: "Archive",
|
|
column: "CreatedById");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Archive_UpdatedById",
|
|
table: "Archive",
|
|
column: "UpdatedById");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Archive_AspNetUsers_CreatedById",
|
|
table: "Archive",
|
|
column: "CreatedById",
|
|
principalTable: "AspNetUsers",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Archive_AspNetUsers_UpdatedById",
|
|
table: "Archive",
|
|
column: "UpdatedById",
|
|
principalTable: "AspNetUsers",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Companies_AspNetUsers_CreatedById",
|
|
table: "Companies",
|
|
column: "CreatedById",
|
|
principalTable: "AspNetUsers",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Companies_AspNetUsers_UpdatedById",
|
|
table: "Companies",
|
|
column: "UpdatedById",
|
|
principalTable: "AspNetUsers",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Games_AspNetUsers_CreatedById",
|
|
table: "Games",
|
|
column: "CreatedById",
|
|
principalTable: "AspNetUsers",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Games_AspNetUsers_UpdatedById",
|
|
table: "Games",
|
|
column: "UpdatedById",
|
|
principalTable: "AspNetUsers",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Tags_AspNetUsers_CreatedById",
|
|
table: "Tags",
|
|
column: "CreatedById",
|
|
principalTable: "AspNetUsers",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Tags_AspNetUsers_UpdatedById",
|
|
table: "Tags",
|
|
column: "UpdatedById",
|
|
principalTable: "AspNetUsers",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Archive_AspNetUsers_CreatedById",
|
|
table: "Archive");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Archive_AspNetUsers_UpdatedById",
|
|
table: "Archive");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Companies_AspNetUsers_CreatedById",
|
|
table: "Companies");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Companies_AspNetUsers_UpdatedById",
|
|
table: "Companies");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Games_AspNetUsers_CreatedById",
|
|
table: "Games");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Games_AspNetUsers_UpdatedById",
|
|
table: "Games");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Tags_AspNetUsers_CreatedById",
|
|
table: "Tags");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Tags_AspNetUsers_UpdatedById",
|
|
table: "Tags");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Tags_CreatedById",
|
|
table: "Tags");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Tags_UpdatedById",
|
|
table: "Tags");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Games_CreatedById",
|
|
table: "Games");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Games_UpdatedById",
|
|
table: "Games");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Companies_CreatedById",
|
|
table: "Companies");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Companies_UpdatedById",
|
|
table: "Companies");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Archive_CreatedById",
|
|
table: "Archive");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Archive_UpdatedById",
|
|
table: "Archive");
|
|
}
|
|
}
|
|
}
|