When using sequelize-auto, I find that I'm always using the following options:
--caseModel p for PascalCase model names
--caseFile l for lower_case file names
--caseProp c for camelCase property names
--singularize for singular model names (User, not Users)
In other words, I like PascalCase model names, lower_case file names, camelCase property names, and singular model names (User. not Users).
I'm considering making these values the default because I think they are popular conventions for Sequelize and JavaScript code.
The current default is to directly use whatever the table and column names are in the database, without changing the case or plural.
Naturally, if we change the default, you can still specify --cm o --cf o --cp --sg false to use the database values, but that puts the burden on those who want the original behavior.
I agree with changing the defaults to these (I also use them except singularize, as I perfer pluralized). It'll have to be a major version bump though since it'll affect the entire output.
When using
sequelize-auto
, I find that I'm always using the following options:--caseModel p
for PascalCase model names--caseFile l
for lower_case file names--caseProp c
for camelCase property names--singularize
for singular model names (User, not Users)In other words, I like PascalCase model names, lower_case file names, camelCase property names, and singular model names (User. not Users).
I'm considering making these values the default because I think they are popular conventions for Sequelize and JavaScript code.
The current default is to directly use whatever the table and column names are in the database, without changing the case or plural.
Naturally, if we change the default, you can still specify
--cm o --cf o --cp --sg false
to use the database values, but that puts the burden on those who want the original behavior.What do you think?