Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete error when removing collection that previously had M2M relationship field #11918

Closed
3 tasks done
mathewdodds opened this issue Mar 2, 2022 · 3 comments
Closed
3 tasks done

Comments

@mathewdodds
Copy link

Preflight Checklist

Describe the Bug

Despite removing the concerning M2M fields of both collections in the relationship, they both become non-removable

To Reproduce

Create two collections. Create M2M relationship with a field in each collection. Remove the fields, try deleting either collection.

Errors Shown

[INTERNAL_SERVER_ERROR] drop table "Community" - cannot drop table "Community" because other objects depend on it

What version of Directus are you using?

9.5.2

What version of Node.js are you using?

16.5.0

What database are you using?

Postgres 13.5

What browser are you using?

Chrome

What operating system are you using?

Ubuntu

How are you deploying Directus?

VPS (ubuntu)

@azrikahar
Copy link
Contributor

Did you delete the junction table as well? I've tested on my end and it does show the same error when I've only deleted the field in both collection, but it works after deleting the junction table (since technically the junction table indeed has their foreign keys).

I'll close this for now, but do update us and we'll reopen if the error still pops up after you deleted the junction table 👍

@stefan1968
Copy link

I'm getting this issue as well, I can't delete the either collections, even though there is no content.

@azrikahar
Copy link
Contributor

@stefan1968 did you delete the junction table beforehand? If it still persists after the junction table has been deleted, opening a new issue with a video clip and minimal reproduction steps would be great to help us understand what could be happening here 👍

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants