Skip to content

Instantly share code, notes, and snippets.

@kianaditya
Last active June 16, 2020 10:47
Show Gist options
  • Save kianaditya/57a1db90bd15a5b0ebb74f2d304c287d to your computer and use it in GitHub Desktop.
Save kianaditya/57a1db90bd15a5b0ebb74f2d304c287d to your computer and use it in GitHub Desktop.
medium express article two
'use strict'
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.bulkInsert(
'Posts',
[
{
title: 'Learning Javascript',
content: 'Learn to learn javascript',
createdAt: new Date(),
updatedAt: new Date()
},
{
title: 'Learn Express',
content: 'Express is pretty easy!',
createdAt: new Date(),
updatedAt: new Date()
},
],
{}
)
},
down: (queryInterface, Sequelize) => {
return queryInterface.bulkDelete('Posts', null, {})
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment