sequelize-middleware/seeders/20200213121737-createSomeColors.js

48 lines
1,007 B
JavaScript
Raw Normal View History

2020-02-13 22:36:14 +01:00
module.exports = {
up: queryInterface => {
return queryInterface.bulkInsert(
"Colors",
[
{
name: "Red",
createdAt: new Date(),
updatedAt: new Date()
},
{
name: "Miami blue",
createdAt: new Date(),
updatedAt: new Date()
},
{
name: "Sirius yellow",
createdAt: new Date(),
updatedAt: new Date()
},
{
name: "Sunflower yellow",
createdAt: new Date(),
updatedAt: new Date()
},
{
name: "Royal blue",
createdAt: new Date(),
updatedAt: new Date()
},
{
name: "White",
createdAt: new Date(),
updatedAt: new Date()
}
],
{}
);
},
down: queryInterface => {
return Promise.all([
queryInterface.bulkDelete("CarsColors", null, {}),
queryInterface.bulkDelete("Colors", null, {})
]);
}
};