Created
February 17, 2020 13:27
-
-
Save pratikagashe/01e49101d2a4e5005b63bfbbc1cd5a24 to your computer and use it in GitHub Desktop.
Seed file to insert data into table postgraphile demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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