Strict snake_case naming strategy for TypeORM targeting PostgreSQL. Current stable version 3.0.2, released as needed. Automatically converts camelCase entity property names (e.g., createdAt) to snake_case database columns (created_at) in tables, relations, and indexes. Lightweight — only one strategy class (PostgresNamingStrategy). Unlike generic naming strategy packages, it adheres strictly to PostgreSQL naming conventions and is tested against TypeORM 0.2 and 0.3. Ships TypeScript definitions and supports both ESM and CJS.
npm install typeorm-postgres-naming-strategiesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connect to PostgreSQL with snake_case naming strategy applied automatically to all entities.
Ensure synchronize: true in TypeORM config or run migrations after defining entities.
Use require('typeorm-postgres-naming-strategies').PostgresNamingStrategyManually override column names using @Column({ name: 'explicit_name' }) if needed.Update import to { PostgresNamingStrategy } and ensure TypeORM >=0.3.Use namingStrategy: new PostgresNamingStrategy() instead of namingStrategy: PostgresNamingStrategy
Use { PostgresNamingStrategy } from 'typeorm-postgres-naming-strategies'.Run npm install typeorm-postgres-naming-strategies and ensure tsconfig.json includes 'node_modules' in typeRoots.