Back to Sequelize

Js Default Caution

docs/_fragments/_js-default-caution.mdx

latest524 B
Original Source

:::caution

The generation of values for DataTypes.NOW and other JavaScript functions are not handled by the Database, but by Sequelize itself. This means that they will only be used when using Model methods. They will not be used in raw queries, in migrations, and all other places where Sequelize does not have access to the Model.

Read about SQL based alternatives in Dynamic SQL default values.

:::