bullpen/backend/seeders/02-users.js

26 lines
634 B
JavaScript

const bcrypt = require("bcryptjs");
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up (queryInterface, Sequelize) {
return queryInterface.bulkInsert('Users', [{
firstName: 'Nolan',
lastName: 'Ryan',
dateOfBirth: new Date(1947, 1, 31),
email: 'ryan.nolan@bullpen.com',
password: bcrypt.hashSync('nolan', 8),
createdAt: new Date(),
updatedAt: new Date(),
}]);
},
async down (queryInterface, Sequelize) {
/**
* Add commands to revert seed here.
*
* Example:
* await queryInterface.bulkDelete('People', null, {});
*/
}
};