fix(mbm): fix the error when deleting a collection contains m2m array fields (#5231)

This commit is contained in:
YANG QIA 2024-09-08 16:26:34 +08:00 committed by GitHub
parent 60903d7c6d
commit d0087f1998
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,9 @@ export function beforeDestroyForeignKey(db: Database) {
const fieldKeys = [];
const collection = db.getCollection(collectionName);
if (!collection) {
return;
}
for (const [, field] of collection.fields) {
const fieldKey = field.options?.key;