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

Removing relationships with dependent objects fails but the console reports success #5436

Closed
timhere opened this issue Jul 21, 2020 · 1 comment · Fixed by #5248
Closed
Assignees
Labels
c/console Related to console

Comments

@timhere
Copy link

timhere commented Jul 21, 2020

Environment

  • docker-compose
  • hasura engine v1.3.0
  • Postgres 12.3

Summary

Attempting to delete a foreign key with dependent objects and permissions is reported as successful by the console, however the operation fails.

Behaviour

If I try to remove a foreign key with dependent objects:

  • go to the Data -> {table} -> Modify tab
  • the console shows an error notification "Deleting foreign key failed", and that the operation can't be performed because of the dependent objects
  • I am asked "Do you want to drop the dependent objects as well?"
  • If I click "Continue" the error disappears and I see a success notification "Foreign key deleted"
  • The foreign key appears to have been deleted and a new timestamp appears in the migrations directory
  • If I navigate away from the "modify" page and then back, the foreign key relationship is still there!
  • Testing using the API Explorer, the relationship still exists

A similar behaviour is observed when trying to delete relationships under the "Relationships" tab.

--

Update:
I've now tried manually removing all reference to a relationship in permissions, and after doing so the specified FK is successfully deleted.

@beerose beerose added c/console Related to console support/needs-triage Needs to be triaged so that we have enough information to add this to our backlog labels Jul 22, 2020
@soorajshankar soorajshankar self-assigned this Jul 22, 2020
@beerose beerose removed the support/needs-triage Needs to be triaged so that we have enough information to add this to our backlog label Oct 5, 2020
@beerose
Copy link
Contributor

beerose commented Nov 11, 2020

Fixed via #6170

@beerose beerose closed this as completed Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/console Related to console
Projects
None yet
3 participants