mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
🧪 Separate statements when clearing mappings in MySQL
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user