knex/src/seed/stub/js.stub

14 lines
410 B
Plaintext
Raw Normal View History

2015-05-09 13:58:18 -04:00
exports.seed = function(knex, Promise) {
// Deletes ALL existing entries
return knex('table_name').del()
.then(function () {
return Promise.join(
// Inserts seed entries
knex('table_name').insert({id: 1, colName: 'rowValue1'}),
knex('table_name').insert({id: 2, colName: 'rowValue2'}),
knex('table_name').insert({id: 3, colName: 'rowValue3'})
);
});
2015-05-09 13:58:18 -04:00
};