fix(dbml): fix dbml output format (#815)

This commit is contained in:
Guy Ben-Aharon
2025-07-30 14:31:56 +03:00
committed by GitHub
parent 00bd535b3c
commit eed104be5b
4 changed files with 62 additions and 45 deletions

View File

@@ -362,9 +362,10 @@ export const exportBaseSQL = ({
.join(', ');
if (fieldNames) {
const indexName = table.schema
? `${table.schema}_${index.name}`
: index.name;
const indexName =
table.schema && !isDBMLFlow
? `${table.schema}_${index.name}`
: index.name;
sqlScript += `CREATE ${index.unique ? 'UNIQUE ' : ''}INDEX ${indexName} ON ${tableName} (${fieldNames});\n`;
}
});