js.stub 342 B

12345678910111213
  1. exports.seed = function(knex, Promise) {
  2. // Deletes ALL existing entries
  3. return knex('table_name').del()
  4. .then(function () {
  5. // Inserts seed entries
  6. return knex('table_name').insert([
  7. {id: 1, colName: 'rowValue1'},
  8. {id: 2, colName: 'rowValue2'},
  9. {id: 3, colName: 'rowValue3'}
  10. ]);
  11. });
  12. };