mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
Authored-by: Vanessa <vanessalouwagie@gmail.com> Co-authored-by: Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Content.Server.Database.Migrations.Postgres
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class DeltaVPatronsCode : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "discord_linking_codes",
|
|
columns: table => new
|
|
{
|
|
player_id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
code = table.Column<Guid>(type: "uuid", nullable: false),
|
|
creation_time = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_discord_linking_codes", x => x.player_id);
|
|
table.ForeignKey(
|
|
name: "FK_discord_linking_codes_player_player_id",
|
|
column: x => x.player_id,
|
|
principalTable: "player",
|
|
principalColumn: "user_id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_discord_linking_codes_code",
|
|
table: "discord_linking_codes",
|
|
column: "code");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "discord_linking_codes");
|
|
}
|
|
}
|
|
}
|