mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Allow a single beatmap to reference the same file multiple times
This fixes incorrect reference counts causing database desync.
This commit is contained in:
@ -2,16 +2,26 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.IO;
|
||||
using SQLite.Net.Attributes;
|
||||
using SQLiteNetExtensions.Attributes;
|
||||
|
||||
namespace osu.Game.Beatmaps
|
||||
{
|
||||
public class BeatmapSetFileInfo
|
||||
{
|
||||
[ForeignKey(typeof(BeatmapSetInfo))]
|
||||
[PrimaryKey, AutoIncrement]
|
||||
public int ID { get; set; }
|
||||
|
||||
[ForeignKey(typeof(BeatmapSetInfo)), NotNull]
|
||||
public int BeatmapSetInfoID { get; set; }
|
||||
|
||||
[ForeignKey(typeof(FileInfo))]
|
||||
[ForeignKey(typeof(FileInfo)), NotNull]
|
||||
public int FileInfoID { get; set; }
|
||||
|
||||
[OneToOne(CascadeOperations = CascadeOperation.CascadeRead)]
|
||||
public FileInfo FileInfo { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public string Filename { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user