2018-01-24 16:35:37 +08:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Migrations
|
|
|
|
|
{
|
2018-01-25 22:41:03 +08:00
|
|
|
|
public partial class Settings : Migration
|
2018-01-24 16:35:37 +08:00
|
|
|
|
{
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropIndex(
|
|
|
|
|
name: "IX_KeyBinding_Variant",
|
|
|
|
|
table: "KeyBinding");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "Settings",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
ID = table.Column<int>(type: "INTEGER", nullable: false)
|
|
|
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
|
|
|
Key = table.Column<int>(type: "INTEGER", nullable: false),
|
2018-01-25 22:41:03 +08:00
|
|
|
|
RulesetID = table.Column<int>(type: "INTEGER", nullable: true),
|
|
|
|
|
Value = table.Column<string>(type: "TEXT", nullable: true),
|
|
|
|
|
Variant = table.Column<int>(type: "INTEGER", nullable: true)
|
2018-01-24 16:35:37 +08:00
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_Settings", x => x.ID);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
name: "IX_KeyBinding_RulesetID_Variant",
|
|
|
|
|
table: "KeyBinding",
|
|
|
|
|
columns: new[] { "RulesetID", "Variant" });
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
2018-01-25 22:41:03 +08:00
|
|
|
|
name: "IX_Settings_RulesetID_Variant",
|
2018-01-24 16:35:37 +08:00
|
|
|
|
table: "Settings",
|
2018-01-25 22:41:03 +08:00
|
|
|
|
columns: new[] { "RulesetID", "Variant" });
|
2018-01-24 16:35:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "Settings");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropIndex(
|
|
|
|
|
name: "IX_KeyBinding_RulesetID_Variant",
|
|
|
|
|
table: "KeyBinding");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
name: "IX_KeyBinding_Variant",
|
|
|
|
|
table: "KeyBinding",
|
|
|
|
|
column: "Variant");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|