Files
SVSimServer/SVSim.Database/Migrations/20260528160031_AddViewerClaimedTutorialGift.cs
2026-05-28 12:02:54 -04:00

42 lines
1.5 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SVSim.Database.Migrations
{
/// <inheritdoc />
public partial class AddViewerClaimedTutorialGift : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ViewerClaimedTutorialGifts",
columns: table => new
{
ViewerId = table.Column<long>(type: "bigint", nullable: false),
PresentId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
ClaimedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ViewerClaimedTutorialGifts", x => new { x.ViewerId, x.PresentId });
table.ForeignKey(
name: "FK_ViewerClaimedTutorialGifts_Viewers_ViewerId",
column: x => x.ViewerId,
principalTable: "Viewers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ViewerClaimedTutorialGifts");
}
}
}