I want to set my date end default value to the currentDate + 12 hours
i try some stuff but that's not work, if someone could help me
dateEnd: {
type: Sequelize.DataTypes.DATE,
defaultValue: sequelize.fn('NOW') + 'INTERVAL 12 HOUR',
allowNull: false
}
thanks
You can use
sequelize.literal
to define a default value that uses DB functions: