oh yeah woo yeah
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kehyeedra/Kehyeedra3/Migrations/20200531193428_oofboof.cs

76 lines
2.4 KiB

using Microsoft.EntityFrameworkCore.Migrations;
namespace Kehyeedra3.Migrations
{
public partial class oofboof : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_BattleFishObject_Users_UserId",
table: "BattleFishObject");
migrationBuilder.DropPrimaryKey(
name: "PK_BattleFishObject",
table: "BattleFishObject");
migrationBuilder.DropIndex(
name: "IX_BattleFishObject_UserId",
table: "BattleFishObject");
migrationBuilder.RenameTable(
name: "BattleFishObject",
newName: "Battlefish");
migrationBuilder.AlterColumn<ulong>(
name: "UserId",
table: "Battlefish",
nullable: false,
oldClrType: typeof(ulong),
oldType: "bigint unsigned",
oldNullable: true);
migrationBuilder.AddPrimaryKey(
name: "PK_Battlefish",
table: "Battlefish",
column: "FishId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_Battlefish",
table: "Battlefish");
migrationBuilder.RenameTable(
name: "Battlefish",
newName: "BattleFishObject");
migrationBuilder.AlterColumn<ulong>(
name: "UserId",
table: "BattleFishObject",
type: "bigint unsigned",
nullable: true,
oldClrType: typeof(ulong));
migrationBuilder.AddPrimaryKey(
name: "PK_BattleFishObject",
table: "BattleFishObject",
column: "FishId");
migrationBuilder.CreateIndex(
name: "IX_BattleFishObject_UserId",
table: "BattleFishObject",
column: "UserId");
migrationBuilder.AddForeignKey(
name: "FK_BattleFishObject_Users_UserId",
table: "BattleFishObject",
column: "UserId",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}