graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

parent_id not dropped although relationship does not exist

Open maaft opened this issue 3 years ago • 2 comments

Version Information

Server Version: 2.9.0 CLI Version (for CLI related issue): 2.9.0

Environment

ubuntu 22.04.

What is the current behaviour?

Attempting to drop column "segmentation_markup_id" from table "datapoint_markups" shows relation ship error, although no relationship is present. The relationship existed before but was deleted.

image

image

What is the expected behaviour?

Drop the column without any error since no relationship is defined.

How to reproduce the issue?

  1. add foreign key relationship between two tables
  2. remove foreign key, remove relationship
  3. try to drop parent_id column

Screenshots or Screencast

maaft avatar Jul 28 '22 13:07 maaft

Dropping DB, restarting Hasura and reapplying all migrations does solve this issue.

maaft avatar Jul 28 '22 13:07 maaft

Same happens to the graphql-schema: After removing the relationship in hasura console, the graphql schema still shows it.

maaft avatar Jul 28 '22 14:07 maaft