NadekoBot/NadekoBot.Core/Migrations/20170112185538_currency-modifications.cs

119 lines
3.9 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore.Migrations;
2017-01-12 19:26:55 +00:00
namespace NadekoBot.Migrations
{
public partial class currencymodifications : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<float>(
name: "BetflipMultiplier",
table: "BotConfig",
nullable: false,
defaultValue: 1.95f);
2017-01-12 19:26:55 +00:00
migrationBuilder.AddColumn<float>(
name: "Betroll100Multiplier",
table: "BotConfig",
nullable: false,
defaultValue: 10f);
2017-01-12 19:26:55 +00:00
migrationBuilder.AddColumn<float>(
name: "Betroll67Multiplier",
table: "BotConfig",
nullable: false,
defaultValue: 2f);
2017-01-12 19:26:55 +00:00
migrationBuilder.AddColumn<float>(
name: "Betroll91Multiplier",
table: "BotConfig",
nullable: false,
defaultValue: 4f);
2017-01-12 19:26:55 +00:00
migrationBuilder.AddColumn<int>(
name: "CurrencyDropAmount",
table: "BotConfig",
nullable: false,
defaultValue: 1);
2017-01-12 19:26:55 +00:00
migrationBuilder.AddColumn<int>(
name: "MinimumBetAmount",
table: "BotConfig",
nullable: false,
defaultValue: 2);
2017-01-12 19:26:55 +00:00
migrationBuilder.AddColumn<int>(
name: "TriviaCurrencyReward",
table: "BotConfig",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "CommandPrice",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
BotConfigId = table.Column<int>(nullable: true),
CommandName = table.Column<string>(nullable: true),
Price = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CommandPrice", x => x.Id);
table.ForeignKey(
name: "FK_CommandPrice_BotConfig_BotConfigId",
column: x => x.BotConfigId,
principalTable: "BotConfig",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_CommandPrice_BotConfigId",
table: "CommandPrice",
column: "BotConfigId");
migrationBuilder.CreateIndex(
name: "IX_CommandPrice_Price",
table: "CommandPrice",
column: "Price",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CommandPrice");
migrationBuilder.DropColumn(
name: "BetflipMultiplier",
table: "BotConfig");
migrationBuilder.DropColumn(
name: "Betroll100Multiplier",
table: "BotConfig");
migrationBuilder.DropColumn(
name: "Betroll67Multiplier",
table: "BotConfig");
migrationBuilder.DropColumn(
name: "Betroll91Multiplier",
table: "BotConfig");
migrationBuilder.DropColumn(
name: "CurrencyDropAmount",
table: "BotConfig");
migrationBuilder.DropColumn(
name: "MinimumBetAmount",
table: "BotConfig");
migrationBuilder.DropColumn(
name: "TriviaCurrencyReward",
table: "BotConfig");
}
}
}