What problem does it solve?
This set of MySQL conventions standardizes schema design and governance to reduce drift, improve consistency, and accelerate development by ensuring uniform engines, character sets, keys, indexing strategies, and data types across projects.
Core Features & Use Cases
- Engine and Charset Rules: Enforce InnoDB with utf8mb4 for reliability and full Unicode support.
- Schema Design Rules: Use snake_case naming, BIGINT UNSIGNED primary keys, NOT NULL with sensible defaults, and generated columns for computed values.
- Indexing & Constraints: Ensure proper indexing of foreign keys, apply left-prefix rules for composite indexes, utilize full-text search patterns, and avoid redundant indexes; prefer lookup tables for mutable enums where appropriate.
- Use Cases: Guiding the design of new schemas, refactoring legacy schemas, and standardizing migrations to maintain cross-team consistency.
Quick Start
Review existing schemas and apply these conventions to new tables and migrations.