{
const data = {
type: Sequelize.DATE,
- allowNull: false,
+ allowNull: true,
defaultValue: Sequelize.NOW
}
await utils.queryInterface.addColumn('video', 'publishedAt', data)
await utils.sequelize.query(query)
}
+ // Sequelize does not alter the column with NOW as default value
+ {
+ const data = {
+ type: Sequelize.DATE,
+ allowNull: false,
+ defaultValue: Sequelize.NOW
+ }
+ await utils.queryInterface.changeColumn('video', 'publishedAt', data)
+ }
+
}
function down (options) {