You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my custom config file specified in the .sequelizerc, I have the that options object, however, they are not being picked up.
It seems like only the underscored work if and only if included in the model:generate as an option --underscored
I expect the config attributes to be picked up and work such that the migration file would include a deleted_at and the createdAt and updatedAt would be created_at and updated_at respectively.
What is actually happening?
It's not picking them up and using the default behaviour. It works exactly the same way with and without the options.
The deleted_at is not created. The createdAt and updatedAt remain the same.
Hi your file myconfig js, it must define an export, agree? Please show us the export i.e. module.exports=... If this doesn't work, I wonder if sequelizerc files simply do not support the options arguments
Hi your file myconfig js, it must define an export, agree? Please show us the export i.e. module.exports=... If this doesn't work, I wonder if sequelizerc files simply do not support the options arguments
What you are doing?
Sequelize has a parameter in it's constructor called
options
https://sequelize.org/api/v6/class/src/sequelize.js~sequelize#instance-constructor-constructorwhich has an item called
define
(more on the define) where additional items such asunderscored
,paranoid
,timestamps
etc. can be specified.In my custom config file specified in the
.sequelizerc
, I have the that options object, however, they are not being picked up.It seems like only the underscored work if and only if included in the
model:generate
as an option--underscored
What do you expect to happen?
I expect the config attributes to be picked up and work such that the migration file would include a
deleted_at
and thecreatedAt
andupdatedAt
would becreated_at
andupdated_at
respectively.What is actually happening?
It's not picking them up and using the default behaviour. It works exactly the same way with and without the
options
.The
deleted_at
is not created. ThecreatedAt
andupdatedAt
remain the same.Dialect: postgres
Sequelize CLI version: 6.4.1
Sequelize version: 6.21.3
Edit 1:
include the
module.exports
in themyconfig.js
as per the comment: #1139 (comment)The text was updated successfully, but these errors were encountered: