mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 17:02:55 +08:00
Revert "Fix removal of FileInfo, BeatmapMetadata, BeatmapDifficulty objects"
This commit is contained in:
parent
56e8c7303c
commit
04e5f764a3
@ -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;
|
||||
|
@ -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; }
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
DeletePending = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Hash = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Protected = table.Column<bool>(type: "INTEGER", nullable: false)
|
||||
ApproachRate = table.Column<float>(type: "REAL", nullable: false),
|
||||
CircleSize = table.Column<float>(type: "REAL", nullable: false),
|
||||
DrainRate = table.Column<float>(type: "REAL", nullable: false),
|
||||
OverallDifficulty = table.Column<float>(type: "REAL", nullable: false),
|
||||
SliderMultiplier = table.Column<float>(type: "REAL", nullable: false),
|
||||
SliderTickRate = table.Column<float>(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<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Artist = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ArtistUnicode = table.Column<string>(type: "TEXT", nullable: true),
|
||||
AudioFile = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Author = table.Column<string>(type: "TEXT", nullable: true),
|
||||
BackgroundFile = table.Column<string>(type: "TEXT", nullable: true),
|
||||
PreviewTime = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Source = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Tags = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Title = table.Column<string>(type: "TEXT", nullable: true),
|
||||
TitleUnicode = table.Column<string>(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<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Artist = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ArtistUnicode = table.Column<string>(type: "TEXT", nullable: true),
|
||||
AudioFile = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Author = table.Column<string>(type: "TEXT", nullable: true),
|
||||
BackgroundFile = table.Column<string>(type: "TEXT", nullable: true),
|
||||
BeatmapSetInfoId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
PreviewTime = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Source = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Tags = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Title = table.Column<string>(type: "TEXT", nullable: true),
|
||||
TitleUnicode = table.Column<string>(type: "TEXT", nullable: true)
|
||||
DeletePending = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Hash = table.Column<string>(type: "TEXT", nullable: true),
|
||||
MetadataID = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Protected = table.Column<bool>(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<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
AudioLeadIn = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
BaseDifficultyID = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
BeatDivisor = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
BeatmapSetInfoID = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Countdown = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
DifficultyID = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
DistanceSpacing = table.Column<double>(type: "REAL", nullable: false),
|
||||
GridSize = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Hash = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Hidden = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
LetterboxInBreaks = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
MD5Hash = table.Column<string>(type: "TEXT", nullable: true),
|
||||
MetadataID = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Path = table.Column<string>(type: "TEXT", nullable: true),
|
||||
RulesetID = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
SpecialStyle = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
StackLeniency = table.Column<float>(type: "REAL", nullable: false),
|
||||
StarDifficulty = table.Column<double>(type: "REAL", nullable: false),
|
||||
StoredBookmarks = table.Column<string>(type: "TEXT", nullable: true),
|
||||
TimelineZoom = table.Column<double>(type: "REAL", nullable: false),
|
||||
Version = table.Column<string>(type: "TEXT", nullable: true),
|
||||
WidescreenStoryboard = table.Column<bool>(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<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
AudioLeadIn = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
BaseDifficultyID = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
BeatDivisor = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
BeatmapSetInfoID = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Countdown = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
DistanceSpacing = table.Column<double>(type: "REAL", nullable: false),
|
||||
GridSize = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Hash = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Hidden = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
LetterboxInBreaks = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
MD5Hash = table.Column<string>(type: "TEXT", nullable: true),
|
||||
MetadataID = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Path = table.Column<string>(type: "TEXT", nullable: true),
|
||||
RulesetID = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
SpecialStyle = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
StackLeniency = table.Column<float>(type: "REAL", nullable: false),
|
||||
StarDifficulty = table.Column<double>(type: "REAL", nullable: false),
|
||||
StoredBookmarks = table.Column<string>(type: "TEXT", nullable: true),
|
||||
TimelineZoom = table.Column<double>(type: "REAL", nullable: false),
|
||||
Version = table.Column<string>(type: "TEXT", nullable: true),
|
||||
WidescreenStoryboard = table.Column<bool>(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<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
ApproachRate = table.Column<float>(type: "REAL", nullable: false),
|
||||
BeatmapInfoId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
CircleSize = table.Column<float>(type: "REAL", nullable: false),
|
||||
DrainRate = table.Column<float>(type: "REAL", nullable: false),
|
||||
OverallDifficulty = table.Column<float>(type: "REAL", nullable: false),
|
||||
SliderMultiplier = table.Column<float>(type: "REAL", nullable: false),
|
||||
SliderTickRate = table.Column<float>(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");
|
||||
}
|
||||
}
|
||||
}
|
@ -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 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<float>("ApproachRate");
|
||||
|
||||
b.Property<int>("BeatmapInfoId");
|
||||
|
||||
b.Property<float>("CircleSize");
|
||||
|
||||
b.Property<float>("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<bool>("Countdown");
|
||||
|
||||
b.Property<int>("DifficultyID");
|
||||
|
||||
b.Property<double>("DistanceSpacing");
|
||||
|
||||
b.Property<int>("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<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");
|
||||
@ -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<string>("Hash");
|
||||
|
||||
b.Property<int?>("MetadataID");
|
||||
|
||||
b.Property<bool>("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
|
||||
}
|
||||
}
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,6 @@
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@ -279,9 +278,9 @@
|
||||
<Compile Include="Beatmaps\Drawables\BeatmapSetCover.cs" />
|
||||
<Compile Include="Beatmaps\Drawables\BeatmapSetHeader.cs" />
|
||||
<Compile Include="Database\IPopulate.cs" />
|
||||
<Compile Include="Migrations\20171015101238_Init.cs" />
|
||||
<Compile Include="Migrations\20171015101238_Init.designer.cs">
|
||||
<DependentUpon>20171015101238_Init.cs</DependentUpon>
|
||||
<Compile Include="Migrations\20171014052545_Init.cs" />
|
||||
<Compile Include="Migrations\20171014052545_Init.designer.cs">
|
||||
<DependentUpon>20171014052545_Init.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\OsuDbContextModelSnapshot.cs" />
|
||||
<Compile Include="Online\API\Requests\GetBeatmapSetRequest.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user