fix(createBulkInsertStreamBase): save checked structure

This commit is contained in:
Nybkox
2025-02-06 11:04:41 +01:00
parent 844d7025fa
commit 13e4c2de03

View File

@@ -31,7 +31,9 @@ export function createBulkInsertStreamBase(driver: EngineDriver, stream, dbhan,
writable.checkStructure = async () => {
let structure = await driver.analyseSingleTable(dbhan, name);
// console.log('ANALYSING', name, structure);
if (structure) {
writable.structure = structure;
}
if (structure && options.dropIfExists) {
logger.info(`Dropping table ${fullNameQuoted}`);
await driver.script(dbhan, `DROP TABLE ${fullNameQuoted}`);