-
Notifications
You must be signed in to change notification settings - Fork 673
/
en-US.json
627 lines (627 loc) · 34.2 KB
/
en-US.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
{
"engine": {
"mysql": "MySQL",
"tidb": "TiDB",
"postgres": "PostgreSQL",
"oracle": "Oracle",
"oceanbase": "OceanBase",
"snowflake": "Snowflake",
"mssql": "SQL Server",
"dm": "DM",
"mariadb": "MariaDB",
"oceanbase_oracle": "OceanBase (Oracle)",
"gaussdb": "GaussDB"
},
"category": {
"engine": "Engine",
"naming": "Naming",
"statement": "Statement",
"table": "Table",
"column": "Column",
"schema": "Schema",
"database": "Database",
"index": "Index",
"system": "System",
"advice": "Advice"
},
"template": {
"bb-sql-review-prod": "Advanced Template",
"bb-sql-review-prod-desc": "Comprehensive policy where you have total protection and best practices for your databases.",
"bb-sql-review-dev": "Basic Template",
"bb-sql-review-dev-desc": "Basic coverage to defend your databases from common misusage.",
"bb-sql-review-sample": "Sample Template",
"bb-sql-review-sample-desc": "A minimum template with DROP protection and disallow column nullable."
},
"rule": {
"engine-mysql-use-innodb": {
"title": "Enforce InnoDB storage engine",
"description": "InnoDB is the default storage engine for MySQL that provides transaction support. It also provides better performance for high-concurrency and low-latency scenarios, and supports online data backup and recovery. It is the preferred choice for OLTP businesses. Suggestion error level: Error"
},
"table-require-pk": {
"title": "Enforce inclusion of primary key in a table",
"description": "In addition to carry business meaning, primary key are also beneficial for high-concurrency queries in MySQL. Various data synchronization, comparison, and rollback tools often require tables to have primary key. Suggestion error level: Error"
},
"table-no-foreign-key": {
"title": "Prohibit using foreign key constraints",
"description": "The advantages and disadvantages of foreign key are highly controversial. Using foreign key may significantly increase the difficulty of database changes, scalability (such as sharding), etc. And may even prevent the use of some tools. Therefore, another option is to implement foreign key constraints at the application layer. Suggestion error level: Warning"
},
"table-drop-naming-convention": {
"title": "Restrict the naming format of tables to be deleted",
"description": "For example, by requiring the \"_del\" suffix, it can effectively prevent accidental deletions. Suggestion error level: Error",
"component": {
"format": {
"title": "Table name format (regex)"
}
}
},
"table-disallow-partition": {
"title": "Prohibit using partition table",
"description": "In some database engines, partitioned tables are not mature, and the use and maintenance are inconvenient. Therefore, it is more inclined to use manual data partitioning methods such as database and table sharding. Suggestion error level: Warning"
},
"table-disallow-trigger": {
"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-text-fields-total-length": {
"title": "Restrict the total length of text fields in a table",
"description": "This rule limits the amount of data a table can hold, preventing excessive storage usage.",
"component": {
"number": {
"title": "Maximum length"
}
}
},
"table-disallow-set-charset": {
"title": "Prohibit defining character set in table properties",
"description": "It is recommended to set the charset at the database level. Setting the charset at finer granularity can bring unnecessary complexities. Suggested error level: Error."
},
"table-comment": {
"title": "Comment convention",
"description": "Configure whether the table requires comments and the maximum comment length.",
"component": {
"required": {
"title": "Require comment"
},
"maxLength": {
"title": "Max length"
}
}
},
"table-disallow-ddl": {
"title": "Disallow DDL",
"description": "Configure which tables are prohibited from executing DDL. Suggestion error level: Warning",
"component": {
"list": {
"title": "Table names"
}
}
},
"table-disallow-dml": {
"title": "Disallow DML",
"description": "Configure which tables are prohibited from executing DML. Suggestion error level: Warning",
"component": {
"list": {
"title": "Table names"
}
}
},
"naming-table": {
"title": "Enforce table naming format",
"description": "The default format is all lowercase letters, separated by underscores between words, and no more than 63 characters long, such as \"abc\" and \"abc_def\". Suggestion error level: Warning",
"component": {
"format": {
"title": "Table name format (regex)"
},
"maxLength": {
"title": "Length limit"
}
}
},
"naming-column": {
"title": "Enforce column naming format",
"description": "The default format is all lowercase letters, separated by underscores between words, which is no more than 63 characters long, such as \"abc\" and \"abc_def\". Suggestion error level: Warning",
"component": {
"format": {
"title": "Column name format (regex)"
},
"maxLength": {
"title": "Length limit"
}
}
},
"naming-index-uk": {
"title": "Enforce unique key naming format",
"description": "The name is allowed to be empty and named by the database. If not empty, the default format is \"uk_<table name>_<unique key column name combination>\", which is no more than 63 characters long, such as \"uk_my_table_id_name\". Suggestion error level: Warning",
"component": {
"format": {
"title": "Unique key name format",
"template": {
"table": "The table name",
"column_list": "Index column names, joined by _"
}
},
"maxLength": {
"title": "Length limit"
}
}
},
"naming-index-pk": {
"title": "Enforce primary key naming format",
"description": "The name is allowed to be empty and named by the database. If not empty, the default format is \"pk_<table name>_<unique key column name combination>\", which is no more than 63 characters long, such as \"pk_my_table_id_name\". Suggestion error level: Warning",
"component": {
"format": {
"title": "Primary key name format",
"template": {
"table": "The table name",
"column_list": "Index column names, joined by _"
}
},
"maxLength": {
"title": "Length limit"
}
}
},
"naming-index-fk": {
"title": "Enforce foreign key naming format",
"description": "The name is allowed to be empty and named by the database. If not empty, the default format is \"fk_<table name>_<unique key column name combination>\", which is no more than 63 characters long, such as \"fk_my_table_id_name\". Suggestion error level: Warning",
"component": {
"format": {
"title": "Foreign key name format",
"template": {
"referencing_table": "The referencing table name",
"referencing_column": "The referencing column name",
"referenced_table": "The referenced table name",
"referenced_column": "The referenced column name"
}
},
"maxLength": {
"title": "Length limit"
}
}
},
"naming-index-idx": {
"title": "Enforce index naming format",
"description": "The name is allowed to be empty and named by the database. If not empty, the default format is \"idx_<table name>_<unique key column name combination>\", which is no more than 63 characters long, such as \"idx_my_table_id_name\". Suggestion error level: Warning",
"component": {
"format": {
"title": "Index name format",
"template": {
"table": "The table name",
"column_list": "Index column names, joined by _"
}
},
"maxLength": {
"title": "Length limit"
}
}
},
"naming-column-auto-increment": {
"title": " Enforce auto-increment column naming format",
"description": "The default column name is \"ID\", and is no more than 63 characters long.",
"component": {
"format": {
"title": "Auto-increment column name format (regex)"
},
"maxLength": {
"title": "Length limit"
}
}
},
"naming-table-no-keyword": {
"title": "Prohibit using keywords as table names",
"description": ""
},
"naming-identifier-no-keyword": {
"title": "Prohibit using keywords as identifiers",
"description": ""
},
"naming-identifier-case": {
"title": "Enforce identifier case",
"description": "",
"component": {
"upper": {
"title": "Upper case"
}
}
},
"column-required": {
"title": "Enforce the inclusion of specific columns in a table",
"description": "Some common columns are helpful for better application maintenance. For example, adding a business-independent \"ID\" column as the primary key avoids primary key conflicts caused by business changes (such as business mergers), and in some scenarios can also bring better data insertion performance. Suggested error level: Warning",
"component": {
"list": {
"title": "Required column names"
}
}
},
"column-type-disallow-list": {
"title": "Prohibit the use of certain column data types",
"description": "Abusing column types can have serious negative effects on system maintainability and performance. For example, using \"LOB\" column to store large amounts of audio and video data may cause database performance to decrease, backup and recovery times to lengthen, and data synchronization tools incompatible. Suggested error level: Error",
"component": {
"list": {
"title": "Disallow list"
}
}
},
"column-no-null": {
"title": "Enforce \"NOT NULL\" constraints on columns",
"description": "Columns cannot have NULL value."
},
"column-disallow-set-charset": {
"title": "Prohibit defining character set in column properties",
"description": "It is recommended to set the charset at the database level or table level. Setting the charset at finer granularity can bring unnecessary complexities. Suggested error level: Error."
},
"column-disallow-change-type": {
"title": "Prohibit modifying column types",
"description": "Modifying column types may affect system performance, maintainability, and even lead to data loss. Suggested error level: Warning"
},
"column-disallow-change": {
"title": "Prohibit using \"CHANGE COLUMN\" statement",
"description": "\"CHANGE COLUMN\" is unique to MySQL syntax and can be used to modify column names and other properties at the same time. However, it may cause the column name to be mistakenly changed when modifying properties. It is recommended to still use standard \"RENAME\" and \"MODIFY\" statements to distinguish between the two types of changes. Suggested error level: Error"
},
"column-disallow-changing-order": {
"title": "Prohibit changing the order of columns in a table",
"description": "Modifying the order of columns may cause some applications or views that depend on the default order of the original table to produce unexpected results, such as \"select *\". Suggested error level: Warning"
},
"column-disallow-drop-in-index": {
"title": "Prohibit dropping columns in index",
"description": "Prohibit dropping columns in index. Suggested error level: Error"
},
"column-set-default-for-not-null": {
"title": "Enforce default value on \"NOT NULL\" columns",
"description": "For a 'NOT NULL' column, if a value is not assigned to the column when inserting a new row and the column does not have a default value, the database will reject the insertion of that row. Setting a default value for a new column can also ensure compatibility with legacy application. Suggested error level: Error"
},
"column-auto-increment-must-integer": {
"title": "Enforce the use of \"INTEGER\" data type for auto-increment columns",
"description": "MySQL's auto-increment column are generally used as business-independent primary key. Using integer types occupies less storage space and makes the primary key index structure more compact, bringing better query and DML performance. Suggested error level: Error"
},
"column-auto-increment-must-unsigned": {
"title": "Enforce the use of \"UNSIGNED\" data type for auto-increment columns",
"description": "Unsigned types do not store negative numbers, and the range of values that can be stored by the same type is doubled, which can avoid auto-increment columns overflow. Suggested error level: Warning"
},
"column-comment": {
"title": "Enforce adding comments to columns",
"description": "Adding comments to columns is a good development practice, but excessively long comments can decrease the readability of the schema.Suggested error level: Warning",
"component": {
"required": {
"title": "Require comment"
},
"maxLength": {
"title": "Max length"
}
}
},
"column-maximum-character-length": {
"title": "Restrict the length of \"CHAR\" data type",
"description": "\"CHAR\" is a fixed-length type. For example, the CHAR(20) column will occupy 20 character spaces even if only one character is stored, causing waste. When the string is too long and the length is not fixed, consider using VARCHAR for MySQL and using TEXT for PostgreSQL. Suggestion error level: Error",
"component": {
"number": {
"title": "Maximum length"
}
}
},
"column-maximum-varchar-length": {
"title": "Restrict the length of \"VARCHAR\" data type",
"description": "",
"component": {
"number": {
"title": "Maximum length"
}
}
},
"column-auto-increment-initial-value": {
"title": "Restrict the initial value of auto-increment columns",
"description": "based on management requirements to limit the initial value of the auto-increment column. Suggestion error level: Warning",
"component": {
"number": {
"title": "Initial value"
}
}
},
"column-current-time-count-limit": {
"title": "Restrict the number of columns in the table that acquire system time",
"description": "Only columns recording the creation time of the record with \"DEFAULT NOW()\" and recording the update time of the record with \"DEFAULT NOW() ON UPDATE\" need to call function to get system time. It is meaningless and will increase resource overhead to record system time in other columns. Suggestion error level: Error"
},
"column-require-default": {
"title": "Enforce setting default value on columns",
"description": "Setting default values that satisfy business logic can effectively improve the data quality of downstream analytical pipeline. This rule does not check \"PRIMARY KEY\", \"JSON\", \"BLOB\", \"TEXT\", \"GEOMETRY\", \"AUTO_INCREMENT\", \"GENERATED\" types. Suggestion error level: Warning"
},
"statement-select-no-select-all": {
"title": "Prohibit using \"SELECT *\"",
"description": "SELECT * to fetch entire row data may cause unnecessary resource overhead and may also cause unexpected results in applications once the table adds or removes columns. Suggestion error level: Error"
},
"statement-where-require": {
"title": "Enforce the presence of \"WHERE\" condition in statements",
"description": "Queries without WHERE clause may cause huge uncessary resource overhead, and DMLs may cause massive accidental data loss. Suggestion error level: Error"
},
"statement-where-no-leading-wildcard-like": {
"title": "Prohibit using leading wildcard in filter conditions",
"description": "When using leading wildcard, such as \"LIKE '%ABC'\", the database optimizer cannot use fast index scan, and fallback to full table scan or full index scan, which may cause serious performance impact. Suggestion error level: Error"
},
"statement-disallow-cascade": {
"title": "Prohibit using \"CASCADE\" option in DDL statements",
"description": "The \"CASCADE\" option can cause a large number of dependent objects to be deleted or modified, which may cause unexpected results. Suggestion error level: Error"
},
"statement-disallow-commit": {
"title": "Prohibit explicit \"COMMIT\" statement",
"description": "In some cases, multiple statements are required to be included in a transaction committed by the system, in order to quickly rerun in case of partial failure. Therefore, explicit \"COMMIT\" is not allowed. Suggestion error level: Warning"
},
"statement-disallow-limit": {
"title": "Prohibit using \"LIMIT\" clause in DML statements",
"description": "If LIMIT is used in DML statements without an ORDER BY clause, the affected rows order are not fixed, which may cause data inconsistency between the primary and replica databases in some replication modes. Suggestion error level: Error"
},
"statement-disallow-order-by": {
"title": "Prohibit using \"ORDER BY\" clause in \"UPDATE\" and \"DELETE\" statements",
"description": "Sorting operations are extremely resource-intensive, so for update and delete operations, it is recommended to use a deterministic filtering condition as much as possible instead of using ORDER BY and LIMIT. Suggestion error level: Error"
},
"statement-merge-alter-table": {
"title": "Prohibit issuing multiple independent changes on the same table",
"description": "Every change to a table may cause a table-level lock and consume a large amount of resources. If there are multiple changes to the same table, they should be merged into a single change statement. Suggestion error level: Error"
},
"statement-insert-must-specify-column": {
"title": "Enforce specifying column names in \"INSERT\" statements",
"description": "The \"INSERT INTO table VALUES (...)\" statement does not explicit list column names. Once the column order changes or columns are added or dropped, the statement may faile or generate unexpected data. Suggestion error level: Error"
},
"statement-insert-disallow-order-by-rand": {
"title": "Prohibit using \"ORDER BY rand()\" in \"INSERT\" statement",
"description": "Randomly sorting the data to be inserted is meaningless and will only consume uncessary resources. Suggestion error level: Error"
},
"statement-insert-row-limit": {
"title": "Restrict the maximum number of inserted rows",
"description": "Reveal the number of rows to be inserted can help determine whether the statement meets business expectations. Suggestion error level: Warning",
"component": {
"number": {
"title": "Maximum insert amount"
}
}
},
"statement-affected-row-limit": {
"title": "Restrict the maximum number of updated or deleted rows (estimated).",
"description": "Reveal the number of rows to be updated or deleted can help determine whether the statement meets business expectations. Suggestion error level: Warning",
"component": {
"number": {
"title": "Maximum affected rows"
}
}
},
"statement-dml-dry-run": {
"title": "Validate the executability of DML statements",
"description": "When the syntax is correct, but the table name is incorrect or the permission is insufficient, it can be discovered by dry run before the actual execution. Suggestion error level: Warning"
},
"statement-disallow-add-column-with-default": {
"title": "Restrict adding columns with default values to a table",
"description": "Before PostgreSQL 11, adding a column with a default value cause table locking and unable to read and write, which may cause business interruption. In PostgreSQL 11 and above, this issue has been optimized and there is no need to pay attention to this rule. Suggestion error level: Warning"
},
"statement-add-check-not-valid": {
"title": "Enforce including \"NOT VALID\" option when adding \"CHECK\" constraints",
"description": "Adding a CHECK constraint needs to verify the existing data and requires ACCESS EXCLUSIVE table lock. This blocks read and write, which may cause business interruption. It is recommended to add the \"NOT VALID\" option to validate new data and manually validate existing data after the change is completed. Suggestion error level: Warning"
},
"statement-disallow-add-not-null": {
"title": "Restrict adding \"NOT NULL\" constraint to existing columns",
"description": "Before PostgreSQL 11, adding a NOT NULL constraint need to verify the existing data. This blocks read and write, which may cause business interruption. In PostgreSQL 11 and above, this issue has been optimized and there is no need to pay attention to this specification. Suggestion error level: Warning"
},
"statement-select-full-table-scan": {
"title": "Check full table scan for queries",
"description": "Full table scan is a resource-intensive operation and may cause serious performance impact. Suggestion error level: Error"
},
"statement-create-specify-schema": {
"title": "Prohibit creating objects without specifying the schema",
"description": "If the schema is not specified, the object will be created in the default schema, which may cause unexpected results."
},
"statement-check-set-role-variable": {
"title": "Check if Set Role statement at the beginning",
"description": "Failure to set the role statement properly at the beginning of a session may lead to unauthorized access or improper permissions assignment, potentially compromising data security and integrity. Suggestion error level: Warning"
},
"statement-disallow-using-temporary": {
"title": "Prohibit using temporary tables",
"description": "Temporary tables are not recommended for use in production environments. They can cause resource contention and performance issues. Suggestion error level: Warning"
},
"statement-disallow-using-filesort": {
"title": "Prohibit using filesort",
"description": "Filesort is a resource-intensive operation and may cause serious performance impact. Suggestion error level: Warning"
},
"statement-where-no-equal-null": {
"title": "Prohibit using NULL equality comparison in WHERE clause",
"description": "The result of NULL equality comparison is always NULL, which may cause unexpected results. Suggestion error level: Warning"
},
"statement-where-disallow-using-function": {
"title": "Do not apply functions or perform calculations on indexed fields in the WHERE clause",
"description": "If you apply a function or perform a calculation on the indexed field, the database cannot use the index and has to scan the entire table instead."
},
"statement-query-minimum-plan-level": {
"title": "Restrict the maximum level of query access method",
"description": "SQL performance optimization strives for constant (const) access, aiming for reference (ref) level as a baseline, with acceptable performance at range level.",
"component": {
"level": {
"title": "Maximum level"
}
}
},
"statement-where-maximum-logical-operator-count": {
"title": "Restrict the number of values in the IN or OR clause of the WHERE clause",
"description": "This prevents performance degradation due to extensive comparisons and resource limitations.",
"component": {
"number": {
"title": "Maximum count"
}
}
},
"statement-maximum-limit-value": {
"title": "Restrict the maximum number of the LIMIT clause",
"description": "Limiting the number of rows through LIMIT ensures the database processes manageable chunks, improving query execution speed. A capped LIMIT value prevents excessive memory usage, safeguarding overall system stability and preventing performance degradation.",
"component": {
"number": {
"title": "Maximum value"
}
}
},
"statement-maximum-join-table-count": {
"title": "Restrict the number of tables to be joined",
"description": "The more tables you join, the more complex the query becomes and the longer it takes to execute. In general, it is best to keep the number of joins to a minimum.",
"component": {
"number": {
"title": "Maximum value"
}
}
},
"statement-maximum-statements-in-transaction": {
"title": "Restrict the number of statements in a transaction",
"description": "Large transactions can significantly impact database performance. If a large number of statements are involved and one fails, rolling back the entire transaction becomes complex. Limiting statements minimizes the potential damage caused by a single failure and simplifies rollback procedures.",
"component": {
"number": {
"title": "Maximum value"
}
}
},
"statement-join-strict-column-attrs": {
"title": "Fields to be joined must have identical data types, character sets",
"description": "If the data types, character sets of the join columns are not identical, the database may not be able to correctly identify matching rows, leading to inaccurate or incomplete results."
},
"statement-disallow-mix-ddl-dml": {
"title": "Disallow mixing DDL and DML",
"description": "For optimal performance and data integrity, avoid combining DDL and DML statements within the same script."
},
"statement-prior-backup-check": {
"title": "Check for prior backup before data change",
"description": "This rule will check if a backup can be created before the data change. For more details, contains the backup target database exists and disallow the DDL statement."
},
"schema-backward-compatibility": {
"title": "Check application backward compatibility",
"description": "Some changes may affect running applications, such as modifying the name of database object, adding new constraints, etc. This rule can avoid careless changes that lead to the failure of existing application. Suggestion error level: Warning"
},
"database-drop-empty-database": {
"title": "Prohibit deleting non-empty database",
"description": "Deletion is only allowed when there are no tables in the database, which can greatly avoid accidental deletion. Suggested error level: Error"
},
"index-no-duplicate-column": {
"title": "Prohibit indexes containing duplicate columns",
"description": "Creating an index with duplicate columns will result in failure. Suggestion error level: Error"
},
"index-type-no-blob": {
"title": "Prohibit creating indexes on \"BLOB\" and \"TEXT\" data type columns",
"description": "The \"BLOB\" type is usually used to store binary data and should not be used as a query condition. If an index is created on this column type by mistake, it will consume a lot of resources and cause serious performance impact. Suggestion error level: Error"
},
"index-pk-type-limit": {
"title": "Primary key type limit",
"description": "Enforce the primary key type to be INT or BIGINT."
},
"index-key-number-limit": {
"title": "Restrict the number of columns in a single index",
"description": "A composite index with over 5 columns does not significantly improve query performance, but it occupies a lot of space and reduces DML performance. Suggestion error level: Warning",
"component": {
"number": {
"title": "Maximum column count"
}
}
},
"index-total-number-limit": {
"title": "Restrict the number of indexes on a single table",
"description": "Although indexes can improve query performance, they also occupy a lot of space and reduce DML performance. Therefore, it is not recommended to create more than 5 indexes in a table. Suggestion error level: Warning",
"component": {
"number": {
"title": "Maximum index count"
}
}
},
"index-primary-key-type-allowlist": {
"title": "Allowable list of primary key types",
"description": "The appropriate primary key type can optimize storage structure, reduce space usage, and beneficial for insert and query performance. Suggestion error level: Warning",
"component": {
"list": {
"title": "Allow list"
}
}
},
"index-create-concurrently": {
"title": "Enforce concurrent index creation",
"description": "In PostgreSQL 11 and above, using the standard statement to create an index will cause table locking and unable to write. Using the \"CONCURRENTLY\" mode can avoid this problem. Suggestion error level: Warning"
},
"index-type-allow-list": {
"title": "Allowable list of index types",
"description": "Different index types have different performance characteristics. For example, B-tree indexes are suitable for range queries, while hash indexes are suitable for equality queries. Suggestion error level: Warning",
"component": {
"list": {
"title": "Allow list"
}
}
},
"system-charset-allowlist": {
"title": "Allowable list of Charset",
"description": "The character set determines which characters can be stored in the table. Using the wrong character set may result in certain characters in the application being unable to be stored and displayed correctly, such as CJK and Emoji. Suggested error level: Error",
"component": {
"list": {
"title": "Allow list"
}
}
},
"system-collation-allowlist": {
"title": "Allowable list of Collation",
"description": "The collation determines the rules for character comparison and sorting. For example, when using a case-insensitive collation, \"ABC\" and \"abc\" will be treated as the same string in queries. Suggested error level: Error",
"component": {
"list": {
"title": "Allow list"
}
}
},
"system-comment-length": {
"title": "Restrict the length of comments",
"description": "",
"component": {
"number": {
"title": "Maximum comment length"
}
}
},
"system-procedure-disallow-create": {
"title": "Disallow to create procedures",
"description": "This rule prohibits the execution of procedures within the database. System procedures often perform critical operations that could impact the stability and security of the database environment. By disallowing their execution, it helps prevent unintended changes and potential vulnerabilities. Suggested error level: Warning"
},
"system-event-disallow-create": {
"title": "Disallow to create events",
"description": "This rule prohibits the creation of events within the database. System events often perform automated tasks that could affect the database environment. By disallowing their creation, it helps maintain control over database operations and prevents potential disruptions. Suggested error level: Warning"
},
"system-view-disallow-create": {
"title": "Disallow to create views",
"description": "This rule prohibits the creation of views within the database. Views provide a virtual representation of data that can simplify queries and enhance data security. By disallowing their creation, it helps maintain control over database schema and prevents potential security risks. Suggested error level: Warning"
},
"system-function-disallow-create": {
"title": "Disallow to create functions",
"description": "This rule prohibits the creation of functions within the database. Functions provide reusable logic that can simplify queries and enhance data integrity. By disallowing their creation, it helps maintain control over database schema and prevents potential security risks. Suggested error level: Warning"
},
"system-function-disallowed-list": {
"title": "Prohibit the use of certain functions",
"description": "This rule restricts the usage of specific functions within the database. By disallowing the use of these functions, it helps maintain data consistency and security. Suggested error level: Warning",
"component": {
"list": {
"title": "Disallow list"
}
}
},
"advice-online-migration": {
"title": "Advise enabling online migration",
"description": "Advise enabling online migration if the migrated table row count exceeds your setting. Suggested error level: Warning",
"component": {
"number": {
"title": "Threshold value"
}
}
},
"statement-add-foreign-key-not-valid": {
"title": "Enforce including \"NOT VALID\" option when adding foreign keys",
"description": "Adding foreign keys needs to verify the existing data and requires SHARE ROW EXCLUSIVE table lock. This blocks write, which may cause business interruption. It is recommended to add the \"NOT VALID\" option to validate new data and validate existing data after the change is completed. Suggestion error level: Warning"
},
"statement-non-transactional": {
"title": "Detect and report non-transactional statements",
"description": ""
}
},
"level": {
"name": "Error Level",
"error": "Error",
"warning": "Warning",
"disabled": "Disabled"
}
}