Initial split of the modules
This commit is contained in:
46
NadekoBot.Core/Migrations/20170814044636_waifu-items.cs
Normal file
46
NadekoBot.Core/Migrations/20170814044636_waifu-items.cs
Normal file
@ -0,0 +1,46 @@
|
||||
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<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
DateAdded = table.Column<DateTime>(nullable: true),
|
||||
Item = table.Column<int>(nullable: false),
|
||||
ItemEmoji = table.Column<string>(nullable: true),
|
||||
Price = table.Column<int>(nullable: false),
|
||||
WaifuInfoId = table.Column<int>(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");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user