dm-tools
Version:
Dev Mentor Project Creator Tools
35 lines (31 loc) • 776 B
JavaScript
;
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
/**
* Add seed commands here.
*
* Example:
* await queryInterface.bulkInsert('People', [{
* name: 'John Doe',
* isBetaMember: false
* }], {});
*/
await queryInterface.bulkInsert('students', [{
name: 'Nancy',
surname: 'Drew',
email: 'nancy.drew@mystrey.com',
createdAt: new Date(),
updatedAt: new Date()
}], {});
},
async down(queryInterface, Sequelize) {
/**
* Add commands to revert seed here.
*
* Example:
* await queryInterface.bulkDelete('People', null, {});
*/
await queryInterface.bulkDelete('students', null, {});
}
};