SYNC: some fixes

This commit is contained in:
SPRINX0\prochazka
2025-02-24 15:18:35 +01:00
committed by Diflow
parent afcb226111
commit 963994b1e5
7 changed files with 31 additions and 8 deletions

View File

@@ -45,6 +45,10 @@ export function createBulkInsertStreamBase(driver: EngineDriver, stream, dbhan,
logger.info({ sql: dmp.s }, `Creating table ${fullNameQuoted}`);
await driver.script(dbhan, dmp.s);
structure = await driver.analyseSingleTable(dbhan, name);
writable.structure = structure;
}
if (!writable.structure) {
throw new Error(`Error importing table - ${fullNameQuoted} not found`);
}
if (options.truncate) {
await driver.script(dbhan, `TRUNCATE TABLE ${fullNameQuoted}`);