mirror of
https://github.com/CyberL1/MyMcRealms.git
synced 2024-11-14 10:28:21 -05:00
51 lines
1.9 KiB
C#
51 lines
1.9 KiB
C#
|
using System;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace Minecraft_Realms_Emulator.Migrations
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class Invites : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Invites",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<int>(type: "integer", nullable: false)
|
|||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|||
|
InvitationId = table.Column<string>(type: "text", nullable: false),
|
|||
|
RecipeintUUID = table.Column<string>(type: "text", nullable: false),
|
|||
|
WorldId = table.Column<int>(type: "integer", nullable: false),
|
|||
|
Date = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_Invites", x => x.Id);
|
|||
|
table.ForeignKey(
|
|||
|
name: "FK_Invites_Worlds_WorldId",
|
|||
|
column: x => x.WorldId,
|
|||
|
principalTable: "Worlds",
|
|||
|
principalColumn: "Id",
|
|||
|
onDelete: ReferentialAction.Cascade);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_Invites_WorldId",
|
|||
|
table: "Invites",
|
|||
|
column: "WorldId");
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Invites");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|