1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-10-17 03:42:50 +02:00
Minecraft-Phantom-Panel/Controller/Phantom.Controller.Database.Postgres/Migrations/20230215101444_EventLog.cs

43 lines
1.5 KiB
C#

using System;
using System.Text.Json;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Phantom.Controller.Database.Postgres.Migrations
{
/// <inheritdoc />
public partial class EventLog : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "EventLog",
schema: "system",
columns: table => new
{
EventGuid = table.Column<Guid>(type: "uuid", nullable: false),
UtcTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
AgentGuid = table.Column<Guid>(type: "uuid", nullable: true),
EventType = table.Column<string>(type: "text", nullable: false),
SubjectType = table.Column<string>(type: "text", nullable: false),
SubjectId = table.Column<string>(type: "text", nullable: false),
Data = table.Column<JsonDocument>(type: "jsonb", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EventLog", x => x.EventGuid);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "EventLog",
schema: "system");
}
}
}