From 7876b75afaab58ba620d4cfe27817ef40468d6b1 Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Mon, 9 Mar 2020 09:49:35 +0100 Subject: [PATCH] fix bulk insert in csv template --- snippets/migration/csv.template.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/migration/csv.template.js b/snippets/migration/csv.template.js index 2ad9f1d..d28dc36 100644 --- a/snippets/migration/csv.template.js +++ b/snippets/migration/csv.template.js @@ -42,8 +42,8 @@ async function up (knex) { const data = await get_csv (); await Promise.all ( data.map ( - (table) => knex (table.name) - .insert (table.data) + // eslint-disable-next-line no-magic-numbers + (table) => knex.bulkInsert (table.name, table.data, 64) ) ); }