mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
fix
This commit is contained in:
@@ -172,6 +172,7 @@ class SqlDumper {
|
||||
* @param {(col: T) => void} lambda
|
||||
*/
|
||||
putCollection(delimiter, collection, lambda) {
|
||||
if (!collection) return;
|
||||
let first = true;
|
||||
for (const item of collection) {
|
||||
if (!first) this.put(delimiter);
|
||||
@@ -196,10 +197,12 @@ class SqlDumper {
|
||||
table.primaryKey.columns.map(x => x.columnName)
|
||||
);
|
||||
}
|
||||
table.foreignKeys.forEach(fk => {
|
||||
this.put(",&n");
|
||||
this.createForeignKeyFore(fk);
|
||||
});
|
||||
if (table.foreignKeys) {
|
||||
table.foreignKeys.forEach(fk => {
|
||||
this.put(",&n");
|
||||
this.createForeignKeyFore(fk);
|
||||
});
|
||||
}
|
||||
// foreach (var cnt in table.Uniques)
|
||||
// {
|
||||
// if (!first) this.put(", &n");
|
||||
|
||||
Reference in New Issue
Block a user