mirror of https://github.com/ppy/osu
Merge pull request #1070 from peppy/transaction-on-import
Use a transaction when adding a beatmap
This commit is contained in:
commit
b2119efddf
|
@ -89,7 +89,11 @@ protected override void PerformMigration(int currentVersion, int newVersion)
|
|||
/// <param name="beatmapSet">The beatmap to add.</param>
|
||||
public void Add(BeatmapSetInfo beatmapSet)
|
||||
{
|
||||
Connection.InsertOrReplaceWithChildren(beatmapSet, true);
|
||||
Connection.RunInTransaction(() =>
|
||||
{
|
||||
Connection.InsertOrReplaceWithChildren(beatmapSet, true);
|
||||
});
|
||||
|
||||
BeatmapSetAdded?.Invoke(beatmapSet);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue