Just ran into this issue, but it seems like it's been reported in several past threads on dspace-tech:
It seems like the communities2item table is no longer utilized when using Discovery. But, constraints on that table block the ability to delete a Collection which contains Items.
Here's the error message that is displayed:
ERROR: update or delete on table "item" violates foreign key constraint "communities2item_item_id_fkey" on table "communities2item" Detail: Key (item_id)=([#]) is still referenced from table "communities2item".
As far as I can tell, this table looks like it should no longer be used (as long as you are using Discovery), so the bug seems related to
DS-2188 (in that the table should be removed once traditional browse support is also removed).
The "quick fix" if you encounter this bug is to simply remove all content from that communities2item table by running the following SQL:
DELETE from communities2item;