1
0
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2024-09-19 16:02:51 -04:00
MyMcRealms/Minecraft-Realms-Emulator/Migrations/20240213104200_Connections.cs
2024-04-20 09:20:30 +02:00

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");
}
}
}