sequelize-auto icon indicating copy to clipboard operation
sequelize-auto copied to clipboard

RFC: Changing the defaults for case and singularize

Open steveschmitt opened this issue 4 years ago • 2 comments

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?

steveschmitt avatar Dec 17 '20 22:12 steveschmitt

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.

JonathanWolfe avatar Dec 21 '20 21:12 JonathanWolfe

To be closed?

Akxe avatar Jul 12 '21 10:07 Akxe