mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 04:13:00 +08:00
Merge pull request #10534 from smoogipoo/fix-ef-ordinal-warning
Silence EF warning due to ordinal being unsupported
This commit is contained in:
commit
daa0a05d9e
@ -96,11 +96,13 @@ namespace osu.Game.Rulesets
|
|||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
|
|
||||||
// add any other modes
|
// add any other modes
|
||||||
|
var existingRulesets = context.RulesetInfo.ToList();
|
||||||
|
|
||||||
foreach (var r in instances.Where(r => !(r is ILegacyRuleset)))
|
foreach (var r in instances.Where(r => !(r is ILegacyRuleset)))
|
||||||
{
|
{
|
||||||
// todo: StartsWith can be changed to Equals on 2020-11-08
|
// todo: StartsWith can be changed to Equals on 2020-11-08
|
||||||
// This is to give users enough time to have their database use new abbreviated info).
|
// This is to give users enough time to have their database use new abbreviated info).
|
||||||
if (context.RulesetInfo.FirstOrDefault(ri => ri.InstantiationInfo.StartsWith(r.RulesetInfo.InstantiationInfo, StringComparison.Ordinal)) == null)
|
if (existingRulesets.FirstOrDefault(ri => ri.InstantiationInfo.StartsWith(r.RulesetInfo.InstantiationInfo, StringComparison.Ordinal)) == null)
|
||||||
context.RulesetInfo.Add(r.RulesetInfo);
|
context.RulesetInfo.Add(r.RulesetInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user