如何在 Sequelize 迁移脚本中将数据添加到表中?这就是我得到的:
module.exports = {
up: function(migration, DataTypes, done) {
migration.createTable(
'person',
{
name: DataTypes.STRING,
age: DataTypes.INTEGER
},
{
charset: 'latin1' // default: null
}
);
// I want to insert person and age.
migration.insert(???);
done()
},
down: function(migration, DataTypes, done) {
migration.dropTable('queue');
done()
}
}