[feat] 增加配置开关CheckDuplicateIndex,是否检查索引重复
This commit is contained in:
parent
f2a1032941
commit
e5c205d804
|
@ -253,7 +253,7 @@ public class TableItem
|
|||
}
|
||||
|
||||
// 检查索引重复,最左原则
|
||||
for (var i = 0; i < table.Indexes.Count; i++)
|
||||
for (var i = 0; i < table.Indexes.Count && XCodeSetting.Current.CheckDuplicateIndex; i++)
|
||||
{
|
||||
var di = table.Indexes[i];
|
||||
for (var j = i + 1; j < table.Indexes.Count; j++)
|
||||
|
|
|
@ -73,6 +73,10 @@ public class XCodeSetting : Config<XCodeSetting>
|
|||
[Description("反向工程。Off 关闭;ReadOnly 只读不执行;On 打开,仅新建;Full 完全,修改删除")]
|
||||
public Migration Migration { get; set; } = Migration.On;
|
||||
|
||||
/// <summary>是否检查索引重复。默认打开</summary>
|
||||
[Description("检查索引重复。默认打开")]
|
||||
public Boolean CheckDuplicateIndex { get; set; } = true;
|
||||
|
||||
/// <summary></summary>
|
||||
[Description("表名称、字段名大小写格式。Default 默认(由数据库决定);None 与模型保持一致;Upper 全大写;Lower 全小写;Underline下划线")]
|
||||
public NameFormats NameFormat { get; set; } = NameFormats.Default;
|
||||
|
|
Loading…
Reference in New Issue