diff --git a/osu.Game/Beatmaps/BeatmapDifficulty.cs b/osu.Game/Beatmaps/BeatmapDifficulty.cs index 25e212f3c5..0c2299e5e6 100644 --- a/osu.Game/Beatmaps/BeatmapDifficulty.cs +++ b/osu.Game/Beatmaps/BeatmapDifficulty.cs @@ -14,6 +14,7 @@ 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 5e47d6c13d..5e1a77a5bf 100644 --- a/osu.Game/Beatmaps/BeatmapMetadata.cs +++ b/osu.Game/Beatmaps/BeatmapMetadata.cs @@ -15,6 +15,7 @@ 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 0be502132f..19e30a23ce 100644 --- a/osu.Game/Beatmaps/BeatmapStore.cs +++ b/osu.Game/Beatmaps/BeatmapStore.cs @@ -73,6 +73,11 @@ 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/20171014052545_Init.designer.cs b/osu.Game/Migrations/20171015101238_Init.Designer.cs similarity index 85% rename from osu.Game/Migrations/20171014052545_Init.designer.cs rename to osu.Game/Migrations/20171015101238_Init.Designer.cs index f151131882..2d37d1d07f 100644 --- a/osu.Game/Migrations/20171014052545_Init.designer.cs +++ b/osu.Game/Migrations/20171015101238_Init.Designer.cs @@ -1,7 +1,4 @@ -// 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; @@ -13,7 +10,7 @@ using System; namespace osu.Game.Migrations { [DbContext(typeof(OsuDbContext))] - [Migration("20171014052545_Init")] + [Migration("20171015101238_Init")] partial class Init { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -29,6 +26,8 @@ namespace osu.Game.Migrations b.Property("ApproachRate"); + b.Property("BeatmapInfoId"); + b.Property("CircleSize"); b.Property("DrainRate"); @@ -41,6 +40,9 @@ namespace osu.Game.Migrations b.HasKey("ID"); + b.HasIndex("BeatmapInfoId") + .IsUnique(); + b.ToTable("BeatmapDifficulty"); }); @@ -59,8 +61,6 @@ namespace osu.Game.Migrations b.Property("Countdown"); - b.Property("DifficultyID"); - b.Property("DistanceSpacing"); b.Property("GridSize"); @@ -97,8 +97,6 @@ namespace osu.Game.Migrations b.HasIndex("BeatmapSetInfoID"); - b.HasIndex("DifficultyID"); - b.HasIndex("MD5Hash"); b.HasIndex("MetadataID"); @@ -119,10 +117,13 @@ namespace osu.Game.Migrations b.Property("AudioFile"); - b.Property("Author"); + b.Property("AuthorString") + .HasColumnName("Author"); b.Property("BackgroundFile"); + b.Property("BeatmapSetInfoId"); + b.Property("PreviewTime"); b.Property("Source"); @@ -135,6 +136,9 @@ namespace osu.Game.Migrations b.HasKey("ID"); + b.HasIndex("BeatmapSetInfoId") + .IsUnique(); + b.ToTable("BeatmapMetadata"); }); @@ -168,16 +172,12 @@ 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,6 +248,14 @@ 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") @@ -255,11 +263,6 @@ 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"); @@ -270,6 +273,14 @@ 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") @@ -282,13 +293,6 @@ 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/20171014052545_Init.cs b/osu.Game/Migrations/20171015101238_Init.cs similarity index 90% rename from osu.Game/Migrations/20171014052545_Init.cs rename to osu.Game/Migrations/20171015101238_Init.cs index 6792f79e3d..afa83a7fff 100644 --- a/osu.Game/Migrations/20171014052545_Init.cs +++ b/osu.Game/Migrations/20171015101238_Init.cs @@ -1,7 +1,4 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace osu.Game.Migrations { @@ -10,43 +7,18 @@ namespace osu.Game.Migrations protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( - name: "BeatmapDifficulty", + name: "BeatmapSetInfo", columns: table => new { ID = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), - 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) + DeletePending = table.Column(type: "INTEGER", nullable: false), + Hash = table.Column(type: "TEXT", nullable: true), + Protected = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { - 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); + table.PrimaryKey("PK_BeatmapSetInfo", x => x.ID); }); migrationBuilder.CreateTable( @@ -95,83 +67,32 @@ namespace osu.Game.Migrations }); migrationBuilder.CreateTable( - name: "BeatmapSetInfo", + name: "BeatmapMetadata", 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), - MetadataID = table.Column(type: "INTEGER", nullable: true), - Protected = table.Column(type: "INTEGER", nullable: false) + 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) }, constraints: table => { - table.PrimaryKey("PK_BeatmapSetInfo", x => x.ID); + table.PrimaryKey("PK_BeatmapMetadata", x => x.ID); table.ForeignKey( - 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, + name: "FK_BeatmapMetadata_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( @@ -201,16 +122,93 @@ 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", @@ -226,6 +224,12 @@ 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", @@ -241,11 +245,6 @@ 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", @@ -288,7 +287,7 @@ namespace osu.Game.Migrations protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( - name: "BeatmapInfo"); + name: "BeatmapDifficulty"); migrationBuilder.DropTable( name: "BeatmapSetFileInfo"); @@ -297,19 +296,19 @@ namespace osu.Game.Migrations name: "KeyBinding"); migrationBuilder.DropTable( - name: "BeatmapDifficulty"); - - migrationBuilder.DropTable( - name: "RulesetInfo"); - - migrationBuilder.DropTable( - name: "BeatmapSetInfo"); + name: "BeatmapInfo"); migrationBuilder.DropTable( name: "FileInfo"); migrationBuilder.DropTable( name: "BeatmapMetadata"); + + migrationBuilder.DropTable( + name: "RulesetInfo"); + + migrationBuilder.DropTable( + name: "BeatmapSetInfo"); } } } diff --git a/osu.Game/Migrations/OsuDbContextModelSnapshot.cs b/osu.Game/Migrations/OsuDbContextModelSnapshot.cs index f3a6c5a520..162119408b 100644 --- a/osu.Game/Migrations/OsuDbContextModelSnapshot.cs +++ b/osu.Game/Migrations/OsuDbContextModelSnapshot.cs @@ -1,7 +1,4 @@ -// 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; @@ -24,6 +21,8 @@ namespace osu.Game.Migrations b.Property("ApproachRate"); + b.Property("BeatmapInfoId"); + b.Property("CircleSize"); b.Property("DrainRate"); @@ -36,6 +35,9 @@ namespace osu.Game.Migrations b.HasKey("ID"); + b.HasIndex("BeatmapInfoId") + .IsUnique(); + b.ToTable("BeatmapDifficulty"); }); @@ -54,8 +56,6 @@ namespace osu.Game.Migrations b.Property("Countdown"); - b.Property("DifficultyID"); - b.Property("DistanceSpacing"); b.Property("GridSize"); @@ -92,8 +92,6 @@ namespace osu.Game.Migrations b.HasIndex("BeatmapSetInfoID"); - b.HasIndex("DifficultyID"); - b.HasIndex("MD5Hash"); b.HasIndex("MetadataID"); @@ -114,10 +112,13 @@ namespace osu.Game.Migrations b.Property("AudioFile"); - b.Property("Author"); + b.Property("AuthorString") + .HasColumnName("Author"); b.Property("BackgroundFile"); + b.Property("BeatmapSetInfoId"); + b.Property("PreviewTime"); b.Property("Source"); @@ -130,6 +131,9 @@ namespace osu.Game.Migrations b.HasKey("ID"); + b.HasIndex("BeatmapSetInfoId") + .IsUnique(); + b.ToTable("BeatmapMetadata"); }); @@ -163,16 +167,12 @@ 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,6 +243,14 @@ 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") @@ -250,11 +258,6 @@ 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"); @@ -265,6 +268,14 @@ 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") @@ -277,13 +288,6 @@ 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 b9154f7e77..404576e832 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -23,6 +23,7 @@ LocalIntranet v4.6.1 true + true publish\ true Disk @@ -197,6 +198,10 @@ ..\packages\System.Runtime.CompilerServices.Unsafe.4.4.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll + True + @@ -274,9 +279,9 @@ - - - 20171014052545_Init.cs + + + 20171015101238_Init.cs diff --git a/osu.Game/packages.config b/osu.Game/packages.config index 8691e7062a..ae7b74ef16 100644 --- a/osu.Game/packages.config +++ b/osu.Game/packages.config @@ -49,4 +49,5 @@ Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/maste + \ No newline at end of file