mirror of
https://github.com/knex/knex.git
synced 2025-07-03 23:19:26 +00:00
14 lines
363 B
Plaintext
14 lines
363 B
Plaintext
import type { 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" }
|
|
]);
|
|
};
|