remove use of temporary table for inverse order

This commit is contained in:
Pierre Noël 2022-12-16 15:54:27 +01:00
parent ab66578671
commit 0413f278bb

View File

@ -328,7 +328,7 @@ const cleanOrderColumnsForInnoDB = async ({
await db.connection await db.connection
.raw( .raw(
` `
CREATE TEMPORARY TABLE ?? CREATE TABLE ??
SELECT SELECT
id, id,
( (
@ -361,9 +361,7 @@ const cleanOrderColumnsForInnoDB = async ({
) )
.transacting(trx); .transacting(trx);
} finally { } finally {
await db.connection await db.connection.raw(`DROP TABLE IF EXISTS ??`, [tempInvOrderTableName]).transacting(trx);
.raw(`DROP TEMPORARY TABLE IF EXISTS ??`, [tempInvOrderTableName])
.transacting(trx);
} }
} }
}; };