mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 05:36:00 +00:00
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const { prepareTableForImport } = require('@dbgate/tools');
|
||||
const _ = require('lodash');
|
||||
|
||||
/**
|
||||
@@ -34,7 +35,7 @@ function createBulkInsertStream(driver, mssql, stream, pool, name, options) {
|
||||
if (options.createIfNotExists && (!structure || options.dropIfExists)) {
|
||||
console.log(`Creating table ${fullName}`);
|
||||
const dmp = driver.createDumper();
|
||||
dmp.createTable({ ...writable.structure, ...name });
|
||||
dmp.createTable(prepareTableForImport({ ...writable.structure, ...name }));
|
||||
console.log(dmp.s);
|
||||
await driver.query(pool, dmp.s);
|
||||
structure = await driver.analyseSingleTable(pool, name);
|
||||
|
||||
Reference in New Issue
Block a user