fix: only save truthy values on wrapper table options

This commit is contained in:
Alaister Young committed 2023-08-18 23:42:33 +10:00
1 parent 5ec623b290
commit d0064bf61a
1 file changed
+4 -2
+4 -2
View File
@@ -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 ')}