mirror of
https://github.com/knex/knex.git
synced 2025-07-04 23:50:32 +00:00
13 lines
285 B
Plaintext
13 lines
285 B
Plaintext
![]() |
|
||
|
export const seed = async (knex) => {
|
||
|
// 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'}
|
||
|
]);
|
||
|
};
|