Skip to content

Instantly share code, notes, and snippets.

@pratikagashe
Created February 17, 2020 13:28
Show Gist options
  • Select an option

  • Save pratikagashe/1d8e4b35d3715cca8e27683522cde093 to your computer and use it in GitHub Desktop.

Select an option

Save pratikagashe/1d8e4b35d3715cca8e27683522cde093 to your computer and use it in GitHub Desktop.
Seed file to insert data into posts postgraphile demo
exports.seed = function(knex) {
// Deletes ALL existing entries
return knex('posts')
.del()
.then(function() {
// Inserts seed entries
return knex('posts').insert([
{
id: 1,
title: 'Sample blog',
body:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec elementum mi purus, dignissim faucibus lectus pulvinar vitae.',
user_id: 1,
},
])
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment