Table Naming Convention
The unified naming convention is desired by developers. And the same applies to the database space. Bytebase provides this rule to unify the table naming convention.
About convention format
Table Naming Convention
uses regular expression as the format.
Some typical format
Name | Regular Expression |
---|---|
snake_lower_case | ^[a-z]+(_[a-z]+)*$ |
CamelCase | ^([A-Z][a-z]*)+$ |
lowerCamelCase | ^[a-z]+([A-Z][a-z]*)*$ |
kebab-case | ^[a-z]+(-[a-z]+)*$ |
How the rule works
Bytebase checks that all table names in DDL conform to the naming conventions.
Specifically, Bytebase checks:
CREATE TABLE
statementsALTER TABLE RENAME TO
statementsRENAME TABLE
statements
Support database engine
- MySQL
- TiDB
Support for PostgreSQL is coming soon.