Merge branch 'develop' of github.com:strapi/strapi into features/media-lib

This commit is contained in:
soupette 2020-04-09 09:13:10 +02:00
commit a38c6738e1

View File

@ -304,11 +304,7 @@ module.exports = async ({ ORM, loadedModel, definition, connection, model }) =>
const allAttrs = ['id', ...attrs];
await trx.raw(`INSERT INTO ?? (${allAttrs.join(', ')}) ??`, [
table,
trx.select(allAttrs).from(tmpTable),
]);
await trx.insert(qb => qb.select(allAttrs).from(tmpTable)).into(table);
await trx.schema.dropTableIfExists(tmpTable);
};