Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix rule name #1752

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sqle/driver/mysql/rule/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,8 @@ var RuleHandlers = []RuleHandler{
{
Rule: driverV2.Rule{
Name: DDLCheckUniqueIndexPrefix,
Desc: "UNIQUE索引名必须使用 IDX_UK_表名_字段名",
Annotation: "通过配置该规则可以规范指定业务的UNIQUE索引命名规则",
Desc: "UNIQUE索引必须使用固定前缀",
Annotation: "通过配置该规则可以规范指定业务的unique索引命名规则,具体命名规范可以自定义设置,默认提示值:uniq_",
Level: driverV2.RuleLevelError,
Category: RuleTypeNamingConvention,
//Value: "uniq_",
Expand Down Expand Up @@ -1851,7 +1851,7 @@ var RuleHandlers = []RuleHandler{
}, {
Rule: driverV2.Rule{
Name: DDLCheckColumnQuantityInPK,
Desc: "表的列数不建议超过阈值",
Desc: "主键包含的列数不建议超过阈值",
Annotation: "主建中的列过多,会导致二级索引占用更多的空间,同时增加索引维护的开销;具体规则阈值可根据业务需求调整,默认值:2",
Level: driverV2.RuleLevelWarn,
Category: RuleTypeDDLConvention,
Expand All @@ -1864,7 +1864,7 @@ var RuleHandlers = []RuleHandler{
},
},
},
Message: "表的列数不建议超过阈值",
Message: "主键包含的列数不建议超过阈值",
Func: checkColumnQuantityInPK,
}, {
Rule: driverV2.Rule{ //select col1,col2 from tbl where name=xx limit 10
Expand Down
Loading