using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace SVSim.Database.Migrations { /// public partial class AddViewerClaimedTutorialGift : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ViewerClaimedTutorialGifts", columns: table => new { ViewerId = table.Column(type: "bigint", nullable: false), PresentId = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), ClaimedAt = table.Column(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); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ViewerClaimedTutorialGifts"); } } }