-
-
Notifications
You must be signed in to change notification settings - Fork 530
Open
Description
We already have declared default values for some columns in db.
When creating records, sequelize.create()
doesn't specify columns if they are not set to a specific value, which is great. Columns will be set to defaults set in db.
Models generated by sequelize-auto
read that default value and include it in model definition. This is undesired behavior. It also
- introduces more complexity (leading to many issues with
defaultValue
: https://github.com/sequelize/sequelize-auto/search?q=defaultvalue&type=issues) - duplicates default value. Updating a column default value now also requires updating js models. We had bugs due to updating db defaults in production, but missed updating js models.
Please leave out 'defaultValue' from generated models, or have an option for it to be left out. Thanks!
Metadata
Metadata
Assignees
Labels
No labels