Skip to content

Question: Is it best to generate models at runtime or during development and push the generated code to source control? #564

Open
@aeharake

Description

I have a best-practice question when using sequelize-auto.

So sequelize-auto's purpose generates the models from the database, it does a great job in doing that and I really thank the author for providing such a powerful library.

So my question is: Is it best to generate these models when building the project or should we do it during development and push the generated models to source control?

What I'm doing now is the following:
Whenever I migrate my database, I use that a bash file to generate the new models, and then continue the development process.

Please correct me if i'm doing anything wrong.

Thank you very much.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions