mirror of
https://github.com/strapi/strapi.git
synced 2025-09-09 08:39:45 +00:00
reduce temporary table name length
This commit is contained in:
parent
b174c7a5d8
commit
05f3335b2a
@ -296,7 +296,7 @@ const cleanOrderColumnsForOldDatabases = async ({
|
|||||||
const randomHex = randomBytes(16).toString('hex');
|
const randomHex = randomBytes(16).toString('hex');
|
||||||
|
|
||||||
if (hasOrderColumn(attribute) && id) {
|
if (hasOrderColumn(attribute) && id) {
|
||||||
const tempOrderTableName = `tempOrderTableName_${now}_${randomHex}`;
|
const tempOrderTableName = `orderTable_${now}_${randomHex}`;
|
||||||
try {
|
try {
|
||||||
await db.connection
|
await db.connection
|
||||||
.raw(
|
.raw(
|
||||||
@ -333,7 +333,7 @@ const cleanOrderColumnsForOldDatabases = async ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hasInverseOrderColumn(attribute) && !isEmpty(inverseRelIds)) {
|
if (hasInverseOrderColumn(attribute) && !isEmpty(inverseRelIds)) {
|
||||||
const tempInvOrderTableName = `tempInvOrderTableName_${now}_${randomHex}`;
|
const tempInvOrderTableName = `invOrderTable_${now}_${randomHex}`;
|
||||||
try {
|
try {
|
||||||
await db.connection
|
await db.connection
|
||||||
.raw(
|
.raw(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user