Skip to content

Instantly share code, notes, and snippets.

Created November 22, 2017 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/bf3ad4486e68307ad06b55fd8f43aef0 to your computer and use it in GitHub Desktop.
Save anonymous/bf3ad4486e68307ad06b55fd8f43aef0 to your computer and use it in GitHub Desktop.
exports.seed = function(knex, Promise) {
// Deletes ALL existing entries
return knex('table_name').del()
.then(function () {
// Inserts seed entries
return knex('table_name').insert([
{
id: 1,
user_id: 1,
chat_id: 1
},
{
id: 2,
user_id: 2,
chat_id: 2
},
]);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment