diff --git a/packages/server/src/integrations/base/sqlTable.ts b/packages/server/src/integrations/base/sqlTable.ts index 4c8181c4b5..4ff336421f 100644 --- a/packages/server/src/integrations/base/sqlTable.ts +++ b/packages/server/src/integrations/base/sqlTable.ts @@ -247,7 +247,7 @@ class SqlTableQueryBuilder { const tableName = schemaName ? `${schemaName}.${json.table.name}` : `${json.table.name}` - const sql = query.toSQL() + const sql = getNativeSql(query) if (Array.isArray(sql)) { for (const query of sql) { if (query.sql.startsWith("exec sp_rename")) {