Skip to content

Instantly share code, notes, and snippets.

@markninja96
Created January 10, 2021 11:11
Show Gist options
  • Select an option

  • Save markninja96/2f7bd03e32ad11144c753e32a09eb818 to your computer and use it in GitHub Desktop.

Select an option

Save markninja96/2f7bd03e32ad11144c753e32a09eb818 to your computer and use it in GitHub Desktop.
'use strict';
const faker = require('faker');
const users = [...Array(200)].map((user) => (
{
firstName: faker.name.firstName(),
lastName: faker.name.lastName(),
email: faker.internet.email(),
gender: faker.name.gender(),
password: faker.internet.password(8),
createdAt: new Date(),
updatedAt: new Date()
}
))
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.bulkInsert('Users', users, {});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.bulkDelete('Users', null, {});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment