File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -331,9 +331,13 @@ public function deleteCollection(string $id): bool
331331
332332 $ sql = $ this ->trigger (Database::EVENT_COLLECTION_DELETE , $ sql );
333333
334- return $ this ->getPDO ()
335- ->prepare ($ sql )
336- ->execute ();
334+ try {
335+ return $ this ->getPDO ()
336+ ->prepare ($ sql )
337+ ->execute ();
338+ } catch (PDOException $ e ) {
339+ throw $ this ->processException ($ e );
340+ }
337341 }
338342
339343 /**
Original file line number Diff line number Diff line change @@ -1449,7 +1449,14 @@ public function deleteCollection(string $id): bool
14491449 $ this ->deleteRelationship ($ collection ->getId (), $ relationship ->getId ());
14501450 }
14511451
1452- $ this ->adapter ->deleteCollection ($ id );
1452+ try {
1453+ $ this ->adapter ->deleteCollection ($ id );
1454+ } catch (NotFoundException $ e ) {
1455+ // HACK: Metadata should still be updated, can be removed when null tenant collections are supported.
1456+ if (!$ this ->adapter ->getSharedTables () || !$ this ->isMigrating ()) {
1457+ throw $ e ;
1458+ }
1459+ }
14531460
14541461 if ($ id === self ::METADATA ) {
14551462 $ deleted = true ;
You can’t perform that action at this time.
0 commit comments