Revert "Fix removal of FileInfo, BeatmapMetadata, BeatmapDifficulty objects"

This commit is contained in:
Dean Herbert
2017-10-16 12:55:36 +09:00
parent 56e8c7303c
commit 04e5f764a3
7 changed files with 168 additions and 186 deletions

View File

@ -1,4 +1,7 @@
// <auto-generated />
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using osu.Game.Database;
@ -21,8 +24,6 @@ namespace osu.Game.Migrations
b.Property<float>("ApproachRate");
b.Property<int>("BeatmapInfoId");
b.Property<float>("CircleSize");
b.Property<float>("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<bool>("Countdown");
b.Property<int>("DifficultyID");
b.Property<double>("DistanceSpacing");
b.Property<int>("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<string>("AudioFile");
b.Property<string>("AuthorString")
.HasColumnName("Author");
b.Property<string>("Author");
b.Property<string>("BackgroundFile");
b.Property<int>("BeatmapSetInfoId");
b.Property<int>("PreviewTime");
b.Property<string>("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<string>("Hash");
b.Property<int?>("MetadataID");
b.Property<bool>("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
}
}