mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
skip empty tables
This commit is contained in:
parent
bffb802ba2
commit
105d5c6ad9
|
@ -41,6 +41,7 @@ export class ExportAllCommand extends BaseCommand {
|
|||
const totalRowsCount = await connection
|
||||
.query(`SELECT COUNT(*) AS count FROM ${tableName}`)
|
||||
.then((rows: Array<{ count: number }>) => rows[0].count);
|
||||
if (totalRowsCount === 0) continue;
|
||||
|
||||
const stream = fs.createWriteStream(join(backupPath, `${tableName}.jsonl`));
|
||||
|
||||
|
|
Loading…
Reference in a new issue