fix bulk insert in csv template
This commit is contained in:
parent
0a3b86e9ca
commit
7876b75afa
@ -42,8 +42,8 @@ async function up (knex) {
|
|||||||
const data = await get_csv ();
|
const data = await get_csv ();
|
||||||
await Promise.all (
|
await Promise.all (
|
||||||
data.map (
|
data.map (
|
||||||
(table) => knex (table.name)
|
// eslint-disable-next-line no-magic-numbers
|
||||||
.insert (table.data)
|
(table) => knex.bulkInsert (table.name, table.data, 64)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user