Add a SharedTableConvention to set IndexesUniqueAcrossTables = false
parent
7f92dfc329
commit
08be903455
@ -0,0 +1,30 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace Microsoft.EntityFrameworkCore.Metadata.Conventions;
|
||||
|
||||
/// <summary>
|
||||
/// A convention that manipulates names of database objects for entity types that share a table to avoid clashes.
|
||||
/// </summary>
|
||||
public class JetSharedTableConvention : SharedTableConvention
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of <see cref="JetSharedTableConvention" />.
|
||||
/// </summary>
|
||||
/// <param name="dependencies">Parameter object containing dependencies for this convention.</param>
|
||||
/// <param name="relationalDependencies"> Parameter object containing relational dependencies for this convention.</param>
|
||||
public JetSharedTableConvention(
|
||||
ProviderConventionSetBuilderDependencies dependencies,
|
||||
RelationalConventionSetBuilderDependencies relationalDependencies)
|
||||
: base(dependencies, relationalDependencies)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override bool IndexesUniqueAcrossTables
|
||||
=> false;
|
||||
}
|
||||
Loading…
Reference in New Issue