knex/lib/seed/stub/js.stub
Tim Branyen 56d73165cb Adds trailing commas to seed stubs
I just started started using the seed feature of knex, which is awesome!
I thought it might be nice to add a trailing comma to make it easier to
copy/paste new lines.

Just a minor tweak.
2015-05-03 13:41:56 -04:00

14 lines
368 B
Plaintext

'use strict';
exports.seed = function(knex, Promise) {
return Promise.join(
// Deletes ALL existing entries
knex('table_name').del(),
// Inserts seed entries
knex('table_name').insert({id: 1, colName: 'rowValue'}),
knex('table_name').insert({id: 2, colName: 'rowValue2'}),
knex('table_name').insert({id: 3, colName: 'rowValue3'}),
);
};