mirror of
https://github.com/knex/knex.git
synced 2025-09-26 16:48:29 +00:00

The liberal use of `any` is frowned upon by some default tslint configurations. That combined with the fact the these functions don't need to return anything, makes it reasonable to use `void` over `any` for the return type.
14 lines
359 B
Plaintext
14 lines
359 B
Plaintext
import * as Knex from "knex";
|
|
|
|
export async function seed(knex: Knex): Promise<void> {
|
|
// Deletes ALL existing entries
|
|
await knex("table_name").del();
|
|
|
|
// Inserts seed entries
|
|
await knex("table_name").insert([
|
|
{ id: 1, colName: "rowValue1" },
|
|
{ id: 2, colName: "rowValue2" },
|
|
{ id: 3, colName: "rowValue3" }
|
|
]);
|
|
};
|