fix bulk insert in csv template

This commit is contained in:
Timo Hocker 2020-03-09 09:49:35 +01:00
parent 0a3b86e9ca
commit 7876b75afa

View File

@ -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)
) )
); );
} }