From 7d2bbc50a365ba8f864443bbdec238fb69d6bf27 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 19 Nov 2017 01:42:13 +0900 Subject: [PATCH] Add unique constraint on OnlineBeatmapID --- osu.Game/Database/OsuDbContext.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Database/OsuDbContext.cs b/osu.Game/Database/OsuDbContext.cs index 928c355696..9c1413b93b 100644 --- a/osu.Game/Database/OsuDbContext.cs +++ b/osu.Game/Database/OsuDbContext.cs @@ -78,6 +78,7 @@ namespace osu.Game.Database { base.OnModelCreating(modelBuilder); + modelBuilder.Entity().HasIndex(b => b.OnlineBeatmapID).IsUnique(); modelBuilder.Entity().HasIndex(b => b.MD5Hash).IsUnique(); modelBuilder.Entity().HasIndex(b => b.Hash).IsUnique();