using System; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace NadekoBot.Migrations.Mysql { public partial class xpitemshop : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "xpshopowneditem", columns: table => new { id = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), userid = table.Column(type: "bigint unsigned", nullable: false), itemtype = table.Column(type: "int", nullable: false), isusing = table.Column(type: "tinyint(1)", nullable: false), itemkey = table.Column(type: "varchar(255)", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), dateadded = table.Column(type: "datetime(6)", nullable: true) }, constraints: table => { table.PrimaryKey("pk_xpshopowneditem", x => x.id); }) .Annotation("MySql:CharSet", "utf8mb4"); 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"); } } }