Store databased settings based on string keys rather than ints

Allows for rearranging/removal from enums without consequence.
This commit is contained in:
Dean Herbert
2019-05-25 15:00:53 +09:00
parent 05c0df53dc
commit 127858d398
5 changed files with 29 additions and 13 deletions

View File

@ -16,7 +16,7 @@ namespace osu.Game.Migrations
{
ID = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Key = table.Column<int>(type: "INTEGER", nullable: false),
Key = table.Column<int>(type: "TEXT", nullable: false),
RulesetID = table.Column<int>(type: "INTEGER", nullable: true),
Value = table.Column<string>(type: "TEXT", nullable: true),
Variant = table.Column<int>(type: "INTEGER", nullable: true)

View File

@ -14,7 +14,7 @@ namespace osu.Game.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.1-servicing-10028");
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062");
modelBuilder.Entity("osu.Game.Beatmaps.BeatmapDifficulty", b =>
{
@ -198,7 +198,7 @@ namespace osu.Game.Migrations
b.Property<int>("ID")
.ValueGeneratedOnAdd();
b.Property<int>("IntKey")
b.Property<string>("Key")
.HasColumnName("Key");
b.Property<int?>("RulesetID");