This commit is contained in:
archer 2025-12-08 00:49:25 +08:00 committed by Finley Ge
parent 48132422b9
commit 6270901b08
No known key found for this signature in database
GPG Key ID: 4C7633901042E27A

View File

@ -107,6 +107,16 @@ try {
// Cron clear invalid data
DatasetDataSchema.index({ updateTime: 1 });
// fileId index
DatasetDataSchema.index(
{ fileId: 1 },
{ unique: true, partialFilterExpression: { fileId: { $exists: true } } }
);
DatasetDataSchema.index(
{ imageId: 1 },
{ unique: true, partialFilterExpression: { imageId: { $exists: true } } }
);
} catch (error) {
console.log(error);
}