1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00

Add linking property on SkinFileInfo to allow EF to understand the link post-rename

This commit is contained in:
Dean Herbert 2021-11-30 15:17:16 +09:00
parent 1a06ea1966
commit 6bf9327228
2 changed files with 4 additions and 0 deletions

View File

@ -135,6 +135,7 @@ namespace osu.Game.Database
modelBuilder.Entity<EFSkinInfo>().HasIndex(b => b.Hash).IsUnique();
modelBuilder.Entity<EFSkinInfo>().HasIndex(b => b.DeletePending);
modelBuilder.Entity<EFSkinInfo>().HasMany(s => s.Files).WithOne(f => f.SkinInfo);
modelBuilder.Entity<DatabasedSetting>().HasIndex(b => new { b.RulesetID, b.Variant });

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using osu.Game.Database;
using osu.Game.IO;
@ -13,6 +14,8 @@ namespace osu.Game.Skinning
public int SkinInfoID { get; set; }
public EFSkinInfo SkinInfo { get; set; }
public int FileInfoID { get; set; }
public FileInfo FileInfo { get; set; }