diff --git a/forward_engineering/configs/templates.js b/forward_engineering/configs/templates.js index fefdd3d1..fed0813c 100644 --- a/forward_engineering/configs/templates.js +++ b/forward_engineering/configs/templates.js @@ -38,7 +38,7 @@ module.exports = { createAsSelect: 'CREATE TABLE IF NOT EXISTS ${name} AS ${selectStatement}${tableOptions};\n', createExternalTable: - 'CREATE EXTERNAL TABLE IF NOT EXISTS \n' + + 'CREATE${orReplace} EXTERNAL TABLE${tableIfNotExists}\n' + '\t${name} (\n' + '\t\t${column_definitions}${out_of_line_constraints}\n' + '\t)${tableOptions};\n', diff --git a/forward_engineering/ddlProvider.js b/forward_engineering/ddlProvider.js index f62feb95..104e6431 100644 --- a/forward_engineering/ddlProvider.js +++ b/forward_engineering/ddlProvider.js @@ -399,7 +399,8 @@ module.exports = (baseProvider, options, app) => { ], comment, ), - + orReplace, + tableIfNotExists, column_definitions: columnDefinitions, out_of_line_constraints: getOutOfLineConstraints( isActivated,