mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -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
|
||||
|
||||
const promises = mappingTables.map((tableName) =>
|
||||
testDb.query(`DELETE FROM ${tableName}; ALTER TABLE ${tableName} AUTO_INCREMENT = 1;`),
|
||||
);
|
||||
const promises = mappingTables.flatMap((tableName) => [
|
||||
testDb.query(`DELETE FROM ${tableName};`),
|
||||
testDb.query(`ALTER TABLE ${tableName} AUTO_INCREMENT = 1;`),
|
||||
]);
|
||||
|
||||
return Promise.all(promises);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue