using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; namespace NadekoBot.Migrations { public partial class waifuitems : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "WaifuItem", columns: table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), DateAdded = table.Column(nullable: true), Item = table.Column(nullable: false), ItemEmoji = table.Column(nullable: true), Price = table.Column(nullable: false), WaifuInfoId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_WaifuItem", x => x.Id); table.ForeignKey( name: "FK_WaifuItem_WaifuInfo_WaifuInfoId", column: x => x.WaifuInfoId, principalTable: "WaifuInfo", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_WaifuItem_WaifuInfoId", table: "WaifuItem", column: "WaifuInfoId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "WaifuItem"); } } }