fix: Replacement parameters in index collision query (#10880)

* fix: Replacement parameters in index collision query

* refactor
This commit is contained in:
Tom Moor
2025-12-12 23:03:59 -05:00
committed by GitHub
parent 4777a90fa9
commit 774c973e0d
+2 -1
View File
@@ -31,7 +31,7 @@ export default async function removeIndexCollision(
where: {
teamId,
deletedAt: null,
index: Sequelize.literal(`"collection"."index" collate "C" > '${index}'`),
index: Sequelize.literal(`"collection"."index" collate "C" > :index`),
},
attributes: ["id", "index"],
limit: 1,
@@ -39,6 +39,7 @@ export default async function removeIndexCollision(
Sequelize.literal('"collection"."index" collate "C"'),
["updatedAt", "DESC"],
],
replacements: { index },
...options,
});
const nextCollectionIndex = nextCollection.length