mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
43 lines
1.5 KiB
C#
43 lines
1.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace NadekoBot.Migrations
|
|
{
|
|
public partial class xpitemshop : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "XpShopOwnedItem",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
|
ItemType = table.Column<int>(type: "INTEGER", nullable: false),
|
|
IsUsing = table.Column<bool>(type: "INTEGER", nullable: false),
|
|
ItemKey = table.Column<string>(type: "TEXT", nullable: false),
|
|
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_XpShopOwnedItem", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_XpShopOwnedItem_UserId_ItemType_ItemKey",
|
|
table: "XpShopOwnedItem",
|
|
columns: new[] { "UserId", "ItemType", "ItemKey" },
|
|
unique: true);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "XpShopOwnedItem");
|
|
}
|
|
}
|
|
}
|