From a94cb541a1088b3c3dd2f80a25dd9e08516e707a Mon Sep 17 00:00:00 2001 From: jacob-buster Date: Wed, 24 Sep 2025 13:20:25 -0600 Subject: [PATCH] Attempted fix for seed script --- packages/database/scripts/seed.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/database/scripts/seed.ts b/packages/database/scripts/seed.ts index 3a61ff376..92fad1821 100644 --- a/packages/database/scripts/seed.ts +++ b/packages/database/scripts/seed.ts @@ -40,6 +40,13 @@ async function upsertData(tx: any, tableName: string, table: any, data: any[]) { if (!data || data.length === 0) return; try { + // Fix YAML content in datasets table by converting literal \n to actual newlines + if (tableName === 'datasets') { + data = data.map(record => ({ + ...record, + ymlFile: record.ymlFile ? record.ymlFile.replace(/\\n/g, '\n') : record.ymlFile + })); + } // For tables that should always use ON CONFLICT DO NOTHING instead of updating const doNothingTables = [ 'assetSearch',