From d0064bf61a41fc759d466e708de20d3599b2ab56 Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Fri, 18 Aug 2023 23:42:33 +1000 Subject: [PATCH] fix: only save truthy values on wrapper table options --- studio/data/fdw/fdw-create-mutation.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/studio/data/fdw/fdw-create-mutation.ts b/studio/data/fdw/fdw-create-mutation.ts index 590ec98f744..3243178d1f3 100644 --- a/studio/data/fdw/fdw-create-mutation.ts +++ b/studio/data/fdw/fdw-create-mutation.ts @@ -101,11 +101,13 @@ export function getCreateFDWSql({ options ( ${Object.entries(newTable) .filter( - ([key]) => + ([key, value]) => key !== 'table_name' && key !== 'schema_name' && key !== 'columns' && - key !== 'index' + key !== 'index' && + key !== 'is_new_schema' && + Boolean(value) ) .map(([key, value]) => `${key} '${value}'`) .join(',\n ')}