hasura / hasura/graphql-engine

Unexpected dependency-error when trying to delete column

Open
#8,383 10 comments 9 reactions 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

v2.3.1-cloud.1 with postgreSql

### What is the expected behaviour?

I should be able to delete my freshly created column again, after realising I choose the wrong type.

### Keywords

- dependency-error
- cannot drop

### What is the current behaviour?

When I try to remove the column (via console or SQL), it fails because of this error:
```json
{
"path": "$[0]",
"error": "cannot drop due to the following dependent objects : permission corporate_post.user.update in source \"default\"",
"code": "dependency-error"
}
```

I double checked the permission table and I also tried to reload metadata and database without success. Since I just created the column without doing anything else, this was kind of expected. In earlier versions I often created and deleted columns without any problems.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the column deletion through the console or SQL on PostgreSQL using the reported permission corporate_post.user.update in source "default". Check whether metadata or database reload changes the dependency error; done means a freshly created column can be deleted without an unexpected dependency-error.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
authorization, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.