diff --git a/osu.Game/Beatmaps/BeatmapDifficulty.cs b/osu.Game/Beatmaps/BeatmapDifficulty.cs index 0c2299e5e6..25e212f3c5 100644 --- a/osu.Game/Beatmaps/BeatmapDifficulty.cs +++ b/osu.Game/Beatmaps/BeatmapDifficulty.cs @@ -14,7 +14,6 @@ namespace osu.Game.Beatmaps [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int ID { get; set; } - public int BeatmapInfoId { get; set; } public float DrainRate { get; set; } = DEFAULT_DIFFICULTY; public float CircleSize { get; set; } = DEFAULT_DIFFICULTY; public float OverallDifficulty { get; set; } = DEFAULT_DIFFICULTY; diff --git a/osu.Game/Beatmaps/BeatmapMetadata.cs b/osu.Game/Beatmaps/BeatmapMetadata.cs index 5e1a77a5bf..5e47d6c13d 100644 --- a/osu.Game/Beatmaps/BeatmapMetadata.cs +++ b/osu.Game/Beatmaps/BeatmapMetadata.cs @@ -15,7 +15,6 @@ namespace osu.Game.Beatmaps [NotMapped] public int? OnlineBeatmapSetID { get; set; } - public int BeatmapSetInfoId { get; set; } public string Title { get; set; } public string TitleUnicode { get; set; } diff --git a/osu.Game/Beatmaps/BeatmapStore.cs b/osu.Game/Beatmaps/BeatmapStore.cs index 19e30a23ce..0be502132f 100644 --- a/osu.Game/Beatmaps/BeatmapStore.cs +++ b/osu.Game/Beatmaps/BeatmapStore.cs @@ -73,11 +73,6 @@ namespace osu.Game.Beatmaps if (beatmapSet.DeletePending) return false; beatmapSet.DeletePending = true; - - // We can't use one to one relationship with its cascade delete because FileInfo can be used not only inside of BeatmapSetFileInfo - var files = beatmapSet.Files.Select(beatmapSetFileInfo => beatmapSetFileInfo.FileInfo); - Connection.FileInfo.RemoveRange(files); - Connection.BeatmapSetInfo.Remove(beatmapSet); Connection.SaveChanges(); diff --git a/osu.Game/Migrations/20171015101238_Init.cs b/osu.Game/Migrations/20171014052545_Init.cs similarity index 91% rename from osu.Game/Migrations/20171015101238_Init.cs rename to osu.Game/Migrations/20171014052545_Init.cs index 61ad66fd25..6792f79e3d 100644 --- a/osu.Game/Migrations/20171015101238_Init.cs +++ b/osu.Game/Migrations/20171014052545_Init.cs @@ -10,18 +10,43 @@ namespace osu.Game.Migrations protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( - name: "BeatmapSetInfo", + name: "BeatmapDifficulty", columns: table => new { ID = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), - DeletePending = table.Column(type: "INTEGER", nullable: false), - Hash = table.Column(type: "TEXT", nullable: true), - Protected = table.Column(type: "INTEGER", nullable: false) + ApproachRate = table.Column(type: "REAL", nullable: false), + CircleSize = table.Column(type: "REAL", nullable: false), + DrainRate = table.Column(type: "REAL", nullable: false), + OverallDifficulty = table.Column(type: "REAL", nullable: false), + SliderMultiplier = table.Column(type: "REAL", nullable: false), + SliderTickRate = table.Column(type: "REAL", nullable: false) }, constraints: table => { - table.PrimaryKey("PK_BeatmapSetInfo", x => x.ID); + table.PrimaryKey("PK_BeatmapDifficulty", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "BeatmapMetadata", + columns: table => new + { + ID = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Artist = table.Column(type: "TEXT", nullable: true), + ArtistUnicode = table.Column(type: "TEXT", nullable: true), + AudioFile = table.Column(type: "TEXT", nullable: true), + Author = table.Column(type: "TEXT", nullable: true), + BackgroundFile = table.Column(type: "TEXT", nullable: true), + PreviewTime = table.Column(type: "INTEGER", nullable: false), + Source = table.Column(type: "TEXT", nullable: true), + Tags = table.Column(type: "TEXT", nullable: true), + Title = table.Column(type: "TEXT", nullable: true), + TitleUnicode = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_BeatmapMetadata", x => x.ID); }); migrationBuilder.CreateTable( @@ -70,32 +95,83 @@ namespace osu.Game.Migrations }); migrationBuilder.CreateTable( - name: "BeatmapMetadata", + name: "BeatmapSetInfo", columns: table => new { ID = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), - Artist = table.Column(type: "TEXT", nullable: true), - ArtistUnicode = table.Column(type: "TEXT", nullable: true), - AudioFile = table.Column(type: "TEXT", nullable: true), - Author = table.Column(type: "TEXT", nullable: true), - BackgroundFile = table.Column(type: "TEXT", nullable: true), - BeatmapSetInfoId = table.Column(type: "INTEGER", nullable: false), - PreviewTime = table.Column(type: "INTEGER", nullable: false), - Source = table.Column(type: "TEXT", nullable: true), - Tags = table.Column(type: "TEXT", nullable: true), - Title = table.Column(type: "TEXT", nullable: true), - TitleUnicode = table.Column(type: "TEXT", nullable: true) + DeletePending = table.Column(type: "INTEGER", nullable: false), + Hash = table.Column(type: "TEXT", nullable: true), + MetadataID = table.Column(type: "INTEGER", nullable: true), + Protected = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { - table.PrimaryKey("PK_BeatmapMetadata", x => x.ID); + table.PrimaryKey("PK_BeatmapSetInfo", x => x.ID); table.ForeignKey( - name: "FK_BeatmapMetadata_BeatmapSetInfo_BeatmapSetInfoId", - column: x => x.BeatmapSetInfoId, + name: "FK_BeatmapSetInfo_BeatmapMetadata_MetadataID", + column: x => x.MetadataID, + principalTable: "BeatmapMetadata", + principalColumn: "ID", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "BeatmapInfo", + columns: table => new + { + ID = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + AudioLeadIn = table.Column(type: "INTEGER", nullable: false), + BaseDifficultyID = table.Column(type: "INTEGER", nullable: false), + BeatDivisor = table.Column(type: "INTEGER", nullable: false), + BeatmapSetInfoID = table.Column(type: "INTEGER", nullable: false), + Countdown = table.Column(type: "INTEGER", nullable: false), + DifficultyID = table.Column(type: "INTEGER", nullable: false), + DistanceSpacing = table.Column(type: "REAL", nullable: false), + GridSize = table.Column(type: "INTEGER", nullable: false), + Hash = table.Column(type: "TEXT", nullable: true), + Hidden = table.Column(type: "INTEGER", nullable: false), + LetterboxInBreaks = table.Column(type: "INTEGER", nullable: false), + MD5Hash = table.Column(type: "TEXT", nullable: true), + MetadataID = table.Column(type: "INTEGER", nullable: true), + Path = table.Column(type: "TEXT", nullable: true), + RulesetID = table.Column(type: "INTEGER", nullable: false), + SpecialStyle = table.Column(type: "INTEGER", nullable: false), + StackLeniency = table.Column(type: "REAL", nullable: false), + StarDifficulty = table.Column(type: "REAL", nullable: false), + StoredBookmarks = table.Column(type: "TEXT", nullable: true), + TimelineZoom = table.Column(type: "REAL", nullable: false), + Version = table.Column(type: "TEXT", nullable: true), + WidescreenStoryboard = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BeatmapInfo", x => x.ID); + table.ForeignKey( + name: "FK_BeatmapInfo_BeatmapSetInfo_BeatmapSetInfoID", + column: x => x.BeatmapSetInfoID, principalTable: "BeatmapSetInfo", principalColumn: "ID", onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_BeatmapInfo_BeatmapDifficulty_DifficultyID", + column: x => x.DifficultyID, + principalTable: "BeatmapDifficulty", + principalColumn: "ID", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_BeatmapInfo_BeatmapMetadata_MetadataID", + column: x => x.MetadataID, + principalTable: "BeatmapMetadata", + principalColumn: "ID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_BeatmapInfo_RulesetInfo_RulesetID", + column: x => x.RulesetID, + principalTable: "RulesetInfo", + principalColumn: "ID", + onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( @@ -125,93 +201,16 @@ namespace osu.Game.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "BeatmapInfo", - columns: table => new - { - ID = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - AudioLeadIn = table.Column(type: "INTEGER", nullable: false), - BaseDifficultyID = table.Column(type: "INTEGER", nullable: false), - BeatDivisor = table.Column(type: "INTEGER", nullable: false), - BeatmapSetInfoID = table.Column(type: "INTEGER", nullable: false), - Countdown = table.Column(type: "INTEGER", nullable: false), - DistanceSpacing = table.Column(type: "REAL", nullable: false), - GridSize = table.Column(type: "INTEGER", nullable: false), - Hash = table.Column(type: "TEXT", nullable: true), - Hidden = table.Column(type: "INTEGER", nullable: false), - LetterboxInBreaks = table.Column(type: "INTEGER", nullable: false), - MD5Hash = table.Column(type: "TEXT", nullable: true), - MetadataID = table.Column(type: "INTEGER", nullable: true), - Path = table.Column(type: "TEXT", nullable: true), - RulesetID = table.Column(type: "INTEGER", nullable: false), - SpecialStyle = table.Column(type: "INTEGER", nullable: false), - StackLeniency = table.Column(type: "REAL", nullable: false), - StarDifficulty = table.Column(type: "REAL", nullable: false), - StoredBookmarks = table.Column(type: "TEXT", nullable: true), - TimelineZoom = table.Column(type: "REAL", nullable: false), - Version = table.Column(type: "TEXT", nullable: true), - WidescreenStoryboard = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_BeatmapInfo", x => x.ID); - table.ForeignKey( - name: "FK_BeatmapInfo_BeatmapSetInfo_BeatmapSetInfoID", - column: x => x.BeatmapSetInfoID, - principalTable: "BeatmapSetInfo", - principalColumn: "ID", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_BeatmapInfo_BeatmapMetadata_MetadataID", - column: x => x.MetadataID, - principalTable: "BeatmapMetadata", - principalColumn: "ID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_BeatmapInfo_RulesetInfo_RulesetID", - column: x => x.RulesetID, - principalTable: "RulesetInfo", - principalColumn: "ID", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "BeatmapDifficulty", - columns: table => new - { - ID = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - ApproachRate = table.Column(type: "REAL", nullable: false), - BeatmapInfoId = table.Column(type: "INTEGER", nullable: false), - CircleSize = table.Column(type: "REAL", nullable: false), - DrainRate = table.Column(type: "REAL", nullable: false), - OverallDifficulty = table.Column(type: "REAL", nullable: false), - SliderMultiplier = table.Column(type: "REAL", nullable: false), - SliderTickRate = table.Column(type: "REAL", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_BeatmapDifficulty", x => x.ID); - table.ForeignKey( - name: "FK_BeatmapDifficulty_BeatmapInfo_BeatmapInfoId", - column: x => x.BeatmapInfoId, - principalTable: "BeatmapInfo", - principalColumn: "ID", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_BeatmapDifficulty_BeatmapInfoId", - table: "BeatmapDifficulty", - column: "BeatmapInfoId", - unique: true); - migrationBuilder.CreateIndex( name: "IX_BeatmapInfo_BeatmapSetInfoID", table: "BeatmapInfo", column: "BeatmapSetInfoID"); + migrationBuilder.CreateIndex( + name: "IX_BeatmapInfo_DifficultyID", + table: "BeatmapInfo", + column: "DifficultyID"); + migrationBuilder.CreateIndex( name: "IX_BeatmapInfo_MD5Hash", table: "BeatmapInfo", @@ -227,12 +226,6 @@ namespace osu.Game.Migrations table: "BeatmapInfo", column: "RulesetID"); - migrationBuilder.CreateIndex( - name: "IX_BeatmapMetadata_BeatmapSetInfoId", - table: "BeatmapMetadata", - column: "BeatmapSetInfoId", - unique: true); - migrationBuilder.CreateIndex( name: "IX_BeatmapSetFileInfo_BeatmapSetInfoID", table: "BeatmapSetFileInfo", @@ -248,6 +241,11 @@ namespace osu.Game.Migrations table: "BeatmapSetInfo", column: "DeletePending"); + migrationBuilder.CreateIndex( + name: "IX_BeatmapSetInfo_MetadataID", + table: "BeatmapSetInfo", + column: "MetadataID"); + migrationBuilder.CreateIndex( name: "IX_FileInfo_Hash", table: "FileInfo", @@ -290,7 +288,7 @@ namespace osu.Game.Migrations protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( - name: "BeatmapDifficulty"); + name: "BeatmapInfo"); migrationBuilder.DropTable( name: "BeatmapSetFileInfo"); @@ -299,19 +297,19 @@ namespace osu.Game.Migrations name: "KeyBinding"); migrationBuilder.DropTable( - name: "BeatmapInfo"); - - migrationBuilder.DropTable( - name: "FileInfo"); - - migrationBuilder.DropTable( - name: "BeatmapMetadata"); + name: "BeatmapDifficulty"); migrationBuilder.DropTable( name: "RulesetInfo"); migrationBuilder.DropTable( name: "BeatmapSetInfo"); + + migrationBuilder.DropTable( + name: "FileInfo"); + + migrationBuilder.DropTable( + name: "BeatmapMetadata"); } } } diff --git a/osu.Game/Migrations/20171015101238_Init.Designer.cs b/osu.Game/Migrations/20171014052545_Init.designer.cs similarity index 85% rename from osu.Game/Migrations/20171015101238_Init.Designer.cs rename to osu.Game/Migrations/20171014052545_Init.designer.cs index 2d37d1d07f..f151131882 100644 --- a/osu.Game/Migrations/20171015101238_Init.Designer.cs +++ b/osu.Game/Migrations/20171014052545_Init.designer.cs @@ -1,4 +1,7 @@ -// +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -10,7 +13,7 @@ using System; namespace osu.Game.Migrations { [DbContext(typeof(OsuDbContext))] - [Migration("20171015101238_Init")] + [Migration("20171014052545_Init")] partial class Init { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -26,8 +29,6 @@ namespace osu.Game.Migrations b.Property("ApproachRate"); - b.Property("BeatmapInfoId"); - b.Property("CircleSize"); b.Property("DrainRate"); @@ -40,9 +41,6 @@ namespace osu.Game.Migrations b.HasKey("ID"); - b.HasIndex("BeatmapInfoId") - .IsUnique(); - b.ToTable("BeatmapDifficulty"); }); @@ -61,6 +59,8 @@ namespace osu.Game.Migrations b.Property("Countdown"); + b.Property("DifficultyID"); + b.Property("DistanceSpacing"); b.Property("GridSize"); @@ -97,6 +97,8 @@ namespace osu.Game.Migrations b.HasIndex("BeatmapSetInfoID"); + b.HasIndex("DifficultyID"); + b.HasIndex("MD5Hash"); b.HasIndex("MetadataID"); @@ -117,13 +119,10 @@ namespace osu.Game.Migrations b.Property("AudioFile"); - b.Property("AuthorString") - .HasColumnName("Author"); + b.Property("Author"); b.Property("BackgroundFile"); - b.Property("BeatmapSetInfoId"); - b.Property("PreviewTime"); b.Property("Source"); @@ -136,9 +135,6 @@ namespace osu.Game.Migrations b.HasKey("ID"); - b.HasIndex("BeatmapSetInfoId") - .IsUnique(); - b.ToTable("BeatmapMetadata"); }); @@ -172,12 +168,16 @@ namespace osu.Game.Migrations b.Property("Hash"); + b.Property("MetadataID"); + b.Property("Protected"); b.HasKey("ID"); b.HasIndex("DeletePending"); + b.HasIndex("MetadataID"); + b.ToTable("BeatmapSetInfo"); }); @@ -248,14 +248,6 @@ namespace osu.Game.Migrations b.ToTable("RulesetInfo"); }); - modelBuilder.Entity("osu.Game.Beatmaps.BeatmapDifficulty", b => - { - b.HasOne("osu.Game.Beatmaps.BeatmapInfo") - .WithOne("Difficulty") - .HasForeignKey("osu.Game.Beatmaps.BeatmapDifficulty", "BeatmapInfoId") - .OnDelete(DeleteBehavior.Cascade); - }); - modelBuilder.Entity("osu.Game.Beatmaps.BeatmapInfo", b => { b.HasOne("osu.Game.Beatmaps.BeatmapSetInfo", "BeatmapSet") @@ -263,6 +255,11 @@ namespace osu.Game.Migrations .HasForeignKey("BeatmapSetInfoID") .OnDelete(DeleteBehavior.Cascade); + b.HasOne("osu.Game.Beatmaps.BeatmapDifficulty", "Difficulty") + .WithMany() + .HasForeignKey("DifficultyID") + .OnDelete(DeleteBehavior.Cascade); + b.HasOne("osu.Game.Beatmaps.BeatmapMetadata", "Metadata") .WithMany() .HasForeignKey("MetadataID"); @@ -273,14 +270,6 @@ namespace osu.Game.Migrations .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("osu.Game.Beatmaps.BeatmapMetadata", b => - { - b.HasOne("osu.Game.Beatmaps.BeatmapSetInfo") - .WithOne("Metadata") - .HasForeignKey("osu.Game.Beatmaps.BeatmapMetadata", "BeatmapSetInfoId") - .OnDelete(DeleteBehavior.Cascade); - }); - modelBuilder.Entity("osu.Game.Beatmaps.BeatmapSetFileInfo", b => { b.HasOne("osu.Game.Beatmaps.BeatmapSetInfo") @@ -293,6 +282,13 @@ namespace osu.Game.Migrations .HasForeignKey("FileInfoID") .OnDelete(DeleteBehavior.Cascade); }); + + modelBuilder.Entity("osu.Game.Beatmaps.BeatmapSetInfo", b => + { + b.HasOne("osu.Game.Beatmaps.BeatmapMetadata", "Metadata") + .WithMany() + .HasForeignKey("MetadataID"); + }); #pragma warning restore 612, 618 } } diff --git a/osu.Game/Migrations/OsuDbContextModelSnapshot.cs b/osu.Game/Migrations/OsuDbContextModelSnapshot.cs index 162119408b..f3a6c5a520 100644 --- a/osu.Game/Migrations/OsuDbContextModelSnapshot.cs +++ b/osu.Game/Migrations/OsuDbContextModelSnapshot.cs @@ -1,4 +1,7 @@ -// +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using osu.Game.Database; @@ -21,8 +24,6 @@ namespace osu.Game.Migrations b.Property("ApproachRate"); - b.Property("BeatmapInfoId"); - b.Property("CircleSize"); b.Property("DrainRate"); @@ -35,9 +36,6 @@ namespace osu.Game.Migrations b.HasKey("ID"); - b.HasIndex("BeatmapInfoId") - .IsUnique(); - b.ToTable("BeatmapDifficulty"); }); @@ -56,6 +54,8 @@ namespace osu.Game.Migrations b.Property("Countdown"); + b.Property("DifficultyID"); + b.Property("DistanceSpacing"); b.Property("GridSize"); @@ -92,6 +92,8 @@ namespace osu.Game.Migrations b.HasIndex("BeatmapSetInfoID"); + b.HasIndex("DifficultyID"); + b.HasIndex("MD5Hash"); b.HasIndex("MetadataID"); @@ -112,13 +114,10 @@ namespace osu.Game.Migrations b.Property("AudioFile"); - b.Property("AuthorString") - .HasColumnName("Author"); + b.Property("Author"); b.Property("BackgroundFile"); - b.Property("BeatmapSetInfoId"); - b.Property("PreviewTime"); b.Property("Source"); @@ -131,9 +130,6 @@ namespace osu.Game.Migrations b.HasKey("ID"); - b.HasIndex("BeatmapSetInfoId") - .IsUnique(); - b.ToTable("BeatmapMetadata"); }); @@ -167,12 +163,16 @@ namespace osu.Game.Migrations b.Property("Hash"); + b.Property("MetadataID"); + b.Property("Protected"); b.HasKey("ID"); b.HasIndex("DeletePending"); + b.HasIndex("MetadataID"); + b.ToTable("BeatmapSetInfo"); }); @@ -243,14 +243,6 @@ namespace osu.Game.Migrations b.ToTable("RulesetInfo"); }); - modelBuilder.Entity("osu.Game.Beatmaps.BeatmapDifficulty", b => - { - b.HasOne("osu.Game.Beatmaps.BeatmapInfo") - .WithOne("Difficulty") - .HasForeignKey("osu.Game.Beatmaps.BeatmapDifficulty", "BeatmapInfoId") - .OnDelete(DeleteBehavior.Cascade); - }); - modelBuilder.Entity("osu.Game.Beatmaps.BeatmapInfo", b => { b.HasOne("osu.Game.Beatmaps.BeatmapSetInfo", "BeatmapSet") @@ -258,6 +250,11 @@ namespace osu.Game.Migrations .HasForeignKey("BeatmapSetInfoID") .OnDelete(DeleteBehavior.Cascade); + b.HasOne("osu.Game.Beatmaps.BeatmapDifficulty", "Difficulty") + .WithMany() + .HasForeignKey("DifficultyID") + .OnDelete(DeleteBehavior.Cascade); + b.HasOne("osu.Game.Beatmaps.BeatmapMetadata", "Metadata") .WithMany() .HasForeignKey("MetadataID"); @@ -268,14 +265,6 @@ namespace osu.Game.Migrations .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("osu.Game.Beatmaps.BeatmapMetadata", b => - { - b.HasOne("osu.Game.Beatmaps.BeatmapSetInfo") - .WithOne("Metadata") - .HasForeignKey("osu.Game.Beatmaps.BeatmapMetadata", "BeatmapSetInfoId") - .OnDelete(DeleteBehavior.Cascade); - }); - modelBuilder.Entity("osu.Game.Beatmaps.BeatmapSetFileInfo", b => { b.HasOne("osu.Game.Beatmaps.BeatmapSetInfo") @@ -288,6 +277,13 @@ namespace osu.Game.Migrations .HasForeignKey("FileInfoID") .OnDelete(DeleteBehavior.Cascade); }); + + modelBuilder.Entity("osu.Game.Beatmaps.BeatmapSetInfo", b => + { + b.HasOne("osu.Game.Beatmaps.BeatmapMetadata", "Metadata") + .WithMany() + .HasForeignKey("MetadataID"); + }); #pragma warning restore 612, 618 } } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 404576e832..03ca32539c 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -23,7 +23,6 @@ LocalIntranet v4.6.1 true - true publish\ true Disk @@ -279,9 +278,9 @@ - - - 20171015101238_Init.cs + + + 20171014052545_Init.cs