Seeding Data
1. Set up your app
2. Set up your database
3. Set up the seed file
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.bulkInsert('Dinosaurs', [{
name: 'General Dino',
type: 'Assemblasaurus'
}], {});
},
down: (queryInterface, Sequelize) => {
return queryInterface.bulkDelete('Dinosaurs', null, {});
}
};4. Seed the data!
Exercise
Last updated