Initial commit
This commit is contained in:
13
node_modules/knex/lib/migrations/seed/stub/ts.stub
generated
vendored
Executable file
13
node_modules/knex/lib/migrations/seed/stub/ts.stub
generated
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
import { 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" }
|
||||
]);
|
||||
};
|
||||
Reference in New Issue
Block a user