mirror of
https://github.com/CyberL1/MyMcRealms.git
synced 2024-11-14 10:28:21 -05:00
45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace Minecraft_Realms_Emulator.Migrations
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class Connections : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Connections",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
WorldId = table.Column<int>(type: "integer", nullable: false),
|
|||
|
Address = table.Column<string>(type: "text", nullable: false),
|
|||
|
PendingUpdate = table.Column<bool>(type: "boolean", nullable: false)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.ForeignKey(
|
|||
|
name: "FK_Connections_Worlds_WorldId",
|
|||
|
column: x => x.WorldId,
|
|||
|
principalTable: "Worlds",
|
|||
|
principalColumn: "Id",
|
|||
|
onDelete: ReferentialAction.Cascade);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_Connections_WorldId",
|
|||
|
table: "Connections",
|
|||
|
column: "WorldId");
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Connections");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|