We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b36fd6f + 91ff816 commit 53e7337Copy full SHA for 53e7337
src/Schema.js
@@ -409,10 +409,14 @@ class Schema {
409
410
if (this.data[className][fieldName].startsWith('relation<')) {
411
//For relations, drop the _Join table
412
- return database.collectionExists(`_Join:${fieldName}:${className}`).then(exist => {
413
- if (exist) {
414
- return database.dropCollection(`_Join:${fieldName}:${className}`);
+ return database.dropCollection(`_Join:${fieldName}:${className}`)
+ .then(() => {
+ return Promise.resolve();
415
+ }, error => {
416
+ if (error.message == 'ns not found') {
417
418
}
419
+ return Promise.reject(error);
420
});
421
422
0 commit comments