mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Fix incorrect initial migration
Also adds variant to settings
This commit is contained in:
@ -10,8 +10,8 @@ using System;
|
||||
namespace osu.Game.Migrations
|
||||
{
|
||||
[DbContext(typeof(OsuDbContext))]
|
||||
[Migration("20180124024000_AddSettings")]
|
||||
partial class AddSettings
|
||||
[Migration("20180125143340_Settings")]
|
||||
partial class Settings
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
@ -202,14 +202,16 @@ namespace osu.Game.Migrations
|
||||
b.Property<int>("IntKey")
|
||||
.HasColumnName("Key");
|
||||
|
||||
b.Property<int>("IntValue")
|
||||
b.Property<int?>("RulesetID");
|
||||
|
||||
b.Property<string>("StringValue")
|
||||
.HasColumnName("Value");
|
||||
|
||||
b.Property<int?>("RulesetID");
|
||||
b.Property<int?>("Variant");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("RulesetID");
|
||||
b.HasIndex("RulesetID", "Variant");
|
||||
|
||||
b.ToTable("Settings");
|
||||
});
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Migrations
|
||||
{
|
||||
public partial class AddSettings : Migration
|
||||
public partial class Settings : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
@ -19,8 +19,9 @@ namespace osu.Game.Migrations
|
||||
ID = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Key = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Value = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
RulesetID = table.Column<int>(type: "INTEGER", nullable: true)
|
||||
RulesetID = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Value = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Variant = table.Column<int>(type: "INTEGER", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@ -33,9 +34,9 @@ namespace osu.Game.Migrations
|
||||
columns: new[] { "RulesetID", "Variant" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Settings_RulesetID",
|
||||
name: "IX_Settings_RulesetID_Variant",
|
||||
table: "Settings",
|
||||
column: "RulesetID");
|
||||
columns: new[] { "RulesetID", "Variant" });
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
@ -201,14 +201,16 @@ namespace osu.Game.Migrations
|
||||
b.Property<int>("IntKey")
|
||||
.HasColumnName("Key");
|
||||
|
||||
b.Property<int>("IntValue")
|
||||
b.Property<int?>("RulesetID");
|
||||
|
||||
b.Property<string>("StringValue")
|
||||
.HasColumnName("Value");
|
||||
|
||||
b.Property<int?>("RulesetID");
|
||||
b.Property<int?>("Variant");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("RulesetID");
|
||||
b.HasIndex("RulesetID", "Variant");
|
||||
|
||||
b.ToTable("Settings");
|
||||
});
|
||||
|
Reference in New Issue
Block a user