From 59424adeb994331e7042ba62969b413bdea10453 Mon Sep 17 00:00:00 2001 From: Kristian Dupont Date: Tue, 3 Nov 2020 11:43:30 +0100 Subject: [PATCH] Trim quotes from reference properties --- src/extract-columns.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/extract-columns.js b/src/extract-columns.js index 58f34202..201687d9 100644 --- a/src/extract-columns.js +++ b/src/extract-columns.js @@ -74,10 +74,13 @@ FROM n: 'SET NULL', d: 'SET DEFAULT', }; + + const trim = (s) => s.replace(/^"(.*)"$/, '$1'); + return { - schema, - table, - column, + schema: trim(schema), + table: trim(table), + column: trim(column), onDelete: updateActionMap[confupdtype], onUpdate: updateActionMap[confdeltype], };