Consistent naming convention across tables and columns
Why it matters
Inconsistent naming conventions are a signature of AI-generated schemas assembled across multiple sessions without coherence review. A schema mixing userId, post_id, CreatedAt, and updated_at forces developers to look up column names for every query, breaks ORM mappings that assume a consistent convention, and produces mapping errors when tools like Prisma generate TypeScript types. ISO 25010 maintainability-readability captures the downstream cost: every new developer must reverse-engineer the implicit rules before they can write correct queries. Naming inconsistencies also cause real bugs when case-sensitive column lookups fail in production queries.
Severity rationale
Low because naming inconsistencies degrade developer productivity and maintainability without directly causing runtime failures or data loss in most ORM setups.
Remediation
Pick one convention — PostgreSQL standard is snake_case with plural table names — and apply it via RENAME COLUMN or ORM @map directives. For Prisma codebases that want camelCase TypeScript but snake_case SQL, use @map and @@map.
model User {
id String @id
createdAt DateTime @map("created_at")
@@map("users")
}
-- Rename inconsistent columns
ALTER TABLE posts RENAME COLUMN "postTitle" TO title;
ALTER TABLE posts RENAME COLUMN "CreatedAt" TO created_at;
For existing applications with ORM-mapped models, prefer @map over database renames to avoid breaking existing queries until you can migrate them all at once.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Database Design & Operations Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · maintainability.readability — Readability
Taxons
History
- 2026-04-18·v1.0.0·Initial import from database-design-operations·automated