Skip to content

Instantly share code, notes, and snippets.

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

  • Save pratikagashe/01e49101d2a4e5005b63bfbbc1cd5a24 to your computer and use it in GitHub Desktop.

Select an option

Save pratikagashe/01e49101d2a4e5005b63bfbbc1cd5a24 to your computer and use it in GitHub Desktop.
Seed file to insert data into table postgraphile demo
exports.seed = function(knex) {
// Deletes ALL existing entries
return knex('users')
.del()
.then(function() {
// Inserts seed entries
return knex('users').insert([
{
id: 1,
name: 'Pratik Agashe',
email: 'pratik@heady.io',
password: 'pratik',
},
])
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment