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
{{ message }}
Repository navigation
Default value for created_at or updated_at isn't added when using underscored: true #10754
Not to sure how relevant the configuration links are, one is for migrations and the other is simple configurations (i.e change what it's called instead of createdAt or if those columns should be added).
When using the model definitions below, without the underscore: true option, the actual table generated has the value 'CURRENT_TIMESTAMP' for default. With the underscore: true, this stops happening.
Activity
sbonami commentedon Apr 12, 2019
There's a
timestampsconfiguration and specific configuration available for those fields.As for relying on the DBMS to actually manage this, Sequelize isn't yet setup for such a function: https://github.com/sequelize/sequelize/blob/v5.3.0/lib/utils.js#L274-L293
mahsan3-zz commentedon May 3, 2019
Not to sure how relevant the configuration links are, one is for migrations and the other is simple configurations (i.e change what it's called instead of createdAt or if those columns should be added).
When using the model definitions below, without the underscore: true option, the actual table generated has the value 'CURRENT_TIMESTAMP' for default. With the underscore: true, this stops happening.
But not really an issue for me at this point, have just proceeded without that option.
papb commentedon Aug 29, 2019
Closing in favor of #11225