From a3bbd579dd2bea831fca628ea67f97288f2b4764 Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Tue, 12 Dec 2023 17:34:29 +0100 Subject: [PATCH] Improved data generator clear data performance ref PROD-233 --- ghost/data-generator/lib/DataGenerator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/data-generator/lib/DataGenerator.js b/ghost/data-generator/lib/DataGenerator.js index 29d00dcb74..066adc8cc2 100644 --- a/ghost/data-generator/lib/DataGenerator.js +++ b/ghost/data-generator/lib/DataGenerator.js @@ -95,7 +95,7 @@ class DataGenerator { // Avoid deleting the admin user await transaction(table).del().whereNot('id', '1'); } else { - await transaction(table).del(); + await transaction(table).truncate(); } } }