-
-
Notifications
You must be signed in to change notification settings - Fork 530
Closed
Description
Why doesn't sequelize model:create foobar --attributes 'foo:string, bar:string
add the default value now()
to createdAt and updatedAt?
'use strict';
module.exports = {
up: function(queryInterface, Sequelize) {
return queryInterface.createTable('foobar', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
foo: {
type: Sequelize.STRING
},
bar: {
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
down: function(queryInterface, Sequelize) {
return queryInterface.dropTable('foobar');
}
};
Metadata
Metadata
Assignees
Labels
No labels