Files
Radicade/Server/Migrations/20260909040000_AddWishlistItems.cs
2026-10-16 23:33:13 -07:00

31 lines
1.2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Infrastructure;
using RadicadeServer.DB;
#nullable disable
namespace RadicadeServer.Migrations;
[DbContext(typeof(RecDBContext))]
[Migration("20260909040000_AddWishlistItems")]
public partial class AddWishlistItems : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "WishlistItems",
columns: table => new
{
WishlistItemId = table.Column<string>(type: "nvarchar(450)", nullable: false),
AccountId = table.Column<long>(type: "bigint", nullable: false),
PurchasableItemId = table.Column<long>(type: "bigint", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table => table.PrimaryKey("PK_WishlistItems", x => x.WishlistItemId));
migrationBuilder.CreateIndex("IX_WishlistItems_AccountId", "WishlistItems", "AccountId");
}
protected override void Down(MigrationBuilder migrationBuilder) => migrationBuilder.DropTable("WishlistItems");
}