Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: add i18n for disallow duplicated index (#10801)
boojack0b544284b1ab
diff --git a/backend/plugin/advisor/config/sql-review.dev.yaml b/backend/plugin/advisor/config/sql-review.dev.yamlindex f685b33b90..1585744d89 100644--- a/backend/plugin/advisor/config/sql-review.dev.yaml+++ b/backend/plugin/advisor/config/sql-review.dev.yaml@@ -19,6 +19,8 @@ ruleList:payload:required: truemaxLength: 64+ - type: table.no-duplicate-index+ level: WARNING- type: statement.select.no-select-alllevel: WARNING- type: statement.where.requirediff --git a/backend/plugin/advisor/config/sql-review.prod.yaml b/backend/plugin/advisor/config/sql-review.prod.yamlindex a8ae9e6eea..d48e952fce 100644--- a/backend/plugin/advisor/config/sql-review.prod.yaml+++ b/backend/plugin/advisor/config/sql-review.prod.yaml@@ -19,6 +19,8 @@ ruleList:payload:required: truemaxLength: 64+ - type: table.no-duplicate-index+ level: WARNING- type: statement.select.no-select-alllevel: ERROR- type: statement.where.requirediff --git a/frontend/src/locales/sql-review/en-US.json b/frontend/src/locales/sql-review/en-US.jsonindex f024485e2a..dbac5a4a77 100644--- a/frontend/src/locales/sql-review/en-US.json+++ b/frontend/src/locales/sql-review/en-US.json@@ -60,6 +60,10 @@"title": "Prevent the use of triggers on tables","description": "This rule restricts the usage of triggers on tables. Triggers can introduce complexity and potential performance issues to database operations. By disallowing triggers, the system can maintain a simpler and more predictable behavior. Suggestion error level: Warning"},+ "table-no-duplicate-index": {+ "title": "Disallow duplicate indexes",+ "description": "This rule prohibits the creation of duplicate indexes on a table. Duplicate indexes consume extra storage space and can potentially reduce query performance. Suggestion error level: Warning"+ },"table-comment": {"title": "Comment convention","description": "Configure whether the table requires comments and the maximum comment length.",diff --git a/frontend/src/locales/sql-review/es-ES.json b/frontend/src/locales/sql-review/es-ES.jsonindex c1622693b8..1d410df6c4 100644--- a/frontend/src/locales/sql-review/es-ES.json+++ b/frontend/src/locales/sql-review/es-ES.json@@ -60,6 +60,10 @@"title": "Prohibir el uso de desencadenadores en tablas","description": "Los desencadenadores pueden hacer que el flujo de control sea difícil de seguir y aumentar la complejidad del sistema. En lugar de usar desencadenadores, se recomienda utilizar la lógica de la aplicación para realizar operaciones de base de datos. Nivel de sugerencia de error: Advertencia"},+ "table-no-duplicate-index": {+ "title": "No se permiten índices duplicados",+ "description": "Esta regla prohíbe la creación de índices duplicados en una tabla. Los índices duplicados consumen espacio de almacenamiento adicional y pueden reducir el rendimiento de las consultas. Nivel de error de sugerencia: Advertencia"+ },"table-comment": {"title": "Convención de comentarios de tabla","description": "Configure si la tabla requiere comentarios y la longitud máxima de comentarios.",diff --git a/frontend/src/locales/sql-review/ja-JP.json b/frontend/src/locales/sql-review/ja-JP.jsonindex bfca737d5e..9a15c4c599 100644--- a/frontend/src/locales/sql-review/ja-JP.json+++ b/frontend/src/locales/sql-review/ja-JP.json@@ -60,6 +60,10 @@"title": "テーブルにトリガの使用を禁止する","description": "トリガはデータベースの複雑さを増加させ、データの整合性を保つための手段としては適切ではありません。代わりに、アプリケーションレイヤーでデータの整合性を保つことをお勧めします。提案エラーレベル:警告"},+ "table-no-duplicate-index": {+ "title": "重複インデックスの禁止",+ "description": "このルールは、テーブル上の重複インデックスの作成を禁止します。重複インデックスは、余分なストレージスペースを占有し、クエリのパフォーマンスを低下させる可能性があります。推奨エラーレベル: 警告"+ },"table-comment": {"title": "コメントの規約","description": "テーブルにコメントが必要かどうか、および最大コメント長を設定します。",diff --git a/frontend/src/locales/sql-review/vi-VN.json b/frontend/src/locales/sql-review/vi-VN.jsonindex 0ca735f90f..f9a4bc4597 100644--- a/frontend/src/locales/sql-review/vi-VN.json+++ b/frontend/src/locales/sql-review/vi-VN.json@@ -60,6 +60,10 @@"title": "Cấm sử dụng cơ chế kích hoạt","description": "Cơ chế kích hoạt có thể gây ra sự không thống nhất dữ liệu và làm giảm hiệu suất. Mức độ lỗi đề xuất: Lỗi"},+ "table-no-duplicate-index": {+ "title": "Cấm chỉ mục trùng lặp",+ "description": "Quy tắc này cấm tạo các chỉ mục trùng lặp trên bảng. Các chỉ mục trùng lặp chiếm dung lượng lưu trữ bổ sung và có thể làm giảm hiệu suất truy vấn. Mức độ lỗi gợi ý: Cảnh báo"+ },"table-comment": {"title": "quy ước bình luận","description": "Định cấu hình xem bảng có yêu cầu nhận xét hay không và độ dài nhận xét tối đa.",diff --git a/frontend/src/locales/sql-review/zh-CN.json b/frontend/src/locales/sql-review/zh-CN.jsonindex af39dbda73..f068575459 100644--- a/frontend/src/locales/sql-review/zh-CN.json+++ b/frontend/src/locales/sql-review/zh-CN.json@@ -61,6 +61,10 @@"title": "禁止使用触发器","description": "触发器可能导致数据库的隐式行为,增加数据库的复杂性,降低可维护性。建议错误等级:警告"},+ "table-no-duplicate-index": {+ "title": "禁止重复索引",+ "description": "此规则禁止在表上创建重复的索引。重复索引会占用额外的存储空间并可能降低查询性能。建议错误等级:警告"+ },"table-comment": {"title": "注释检查","description": "配置表是否需要注释和最大注释长度。",diff --git a/frontend/src/types/sql-review-schema.yaml b/frontend/src/types/sql-review-schema.yamlindex b891f98cab..cf6a42eb5a 100644--- a/frontend/src/types/sql-review-schema.yaml+++ b/frontend/src/types/sql-review-schema.yaml@@ -86,6 +86,11 @@ ruleList:engineList:- MYSQLcomponentList: []+ - type: table.no-duplicate-index+ category: TABLE+ engineList:+ - MYSQL+ componentList: []- type: statement.select.no-select-allcategory: STATEMENTengineList:diff --git a/frontend/src/types/sqlReview.ts b/frontend/src/types/sqlReview.tsindex d3ec45aa11..2c61318c3c 100644--- a/frontend/src/types/sqlReview.ts+++ b/frontend/src/types/sqlReview.ts@@ -104,6 +104,7 @@ export type RuleType =| "table.drop-naming-convention"| "table.disallow-partition"| "table.disallow-trigger"+ | "table.no-duplicate-index"| "table.comment"| "naming.table"| "naming.column"