Skip to content

Commit

Permalink
fix(db): pluralize table names by default (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
goldcaddy77 authored Jan 20, 2019
1 parent 9df34ad commit a74586c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/torm/SnakeNamingStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class SnakeNamingStrategy extends DefaultNamingStrategy implements Naming
}

tableName(className: string, customName: string): string {
return customName ? customName : snakeCase(className);
return customName ? customName : `${snakeCase(className)}s`;
}

columnName(propertyName: string, customName: string, embeddedPrefixes: string[]): string {
Expand Down

0 comments on commit a74586c

Please sign in to comment.