ts.stub 444 B

1234567891011121314
  1. import * as Knex from "knex";
  2. exports.seed = function (knex: Knex): Promise<any> {
  3. // Deletes ALL existing entries
  4. return knex("table_name").del()
  5. .then(function () {
  6. // Inserts seed entries
  7. return knex("table_name").insert([
  8. { id: 1, colName: "rowValue1" },
  9. { id: 2, colName: "rowValue2" },
  10. { id: 3, colName: "rowValue3" }
  11. ]);
  12. });
  13. };