Files
GerbilManager/GerbilManagerWebAPI/Migrations/20260622201620_AddExhibitionResult.cs
2026-06-22 22:43:19 +02:00

47 lines
1.8 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace GerbilManagerWebAPI.Migrations
{
/// <inheritdoc />
public partial class AddExhibitionResult : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ExhibitionResults",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
GerbilId = table.Column<Guid>(type: "uuid", nullable: true),
EntityName = table.Column<string>(type: "text", nullable: true),
EventName = table.Column<string>(type: "text", nullable: false),
Date = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
Placement = table.Column<string>(type: "text", nullable: true),
Award = table.Column<string>(type: "text", nullable: true),
Note = table.Column<string>(type: "text", nullable: true),
CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ExhibitionResults", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_ExhibitionResults_GerbilId",
table: "ExhibitionResults",
column: "GerbilId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ExhibitionResults");
}
}
}