mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08:00
🧪 Separate statements when clearing mappings in MySQL
This commit is contained in:
parent
e6347e34ca
commit
945eb63878
|
@ -174,9 +174,10 @@ async function truncateMappingTables(
|
||||||
|
|
||||||
// mysqldb, mariadb
|
// mysqldb, mariadb
|
||||||
|
|
||||||
const promises = mappingTables.map((tableName) =>
|
const promises = mappingTables.flatMap((tableName) => [
|
||||||
testDb.query(`DELETE FROM ${tableName}; ALTER TABLE ${tableName} AUTO_INCREMENT = 1;`),
|
testDb.query(`DELETE FROM ${tableName};`),
|
||||||
);
|
testDb.query(`ALTER TABLE ${tableName} AUTO_INCREMENT = 1;`),
|
||||||
|
]);
|
||||||
|
|
||||||
return Promise.all(promises);
|
return Promise.all(promises);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue