Missing related data

Feature(s) impacted

The “details” view of an item doesn’t fully work.

Observed behavior

For the “details” view of an item, some of the related data relationships are missing.

Expected behavior

I would expect to see all foreign keys. Instead, given the below table, I only have the link to xxx_model, not yyy_model not a_b_c

    Column           |            Type            | Nullable |                                      Default                                       
-------------------+----------------------------+----------+-------------------------------------------------------------------
 created_at        | timestamp with time zone   |          | now()
 a                 | character varying          | not null | 
 b                 | character varying          | not null | 
 a_and_b           | character varying          | not null | generated always as (((a::text || ' | '::text) || b::text)) stored
 id                | integer                    | not null | nextval('model_seq'::regclass)
Indexes:
    "model_pkey" PRIMARY KEY, btree (id)
    "model_a_and_b_fkey" UNIQUE CONSTRAINT, btree (a_and_b)
Foreign-key constraints:
    "model_a_fkey" FOREIGN KEY (a) REFERENCES a(a) ON UPDATE CASCADE
Referenced by:
    TABLE "a_b_c" CONSTRAINT "abc_a_and_b_fkey" FOREIGN KEY (a_and_b) REFERENCES model(a_and_b) ON UPDATE CASCADE
    TABLE "xxx_model" CONSTRAINT "xxx_model_a_and_b_fkey" FOREIGN KEY (a_and_b) REFERENCES model(a_and_b) ON UPDATE CASCADE
    TABLE "yyy_model" CONSTRAINT "yyy_model_a_and_b_fkey" FOREIGN KEY (a_and_b) REFERENCES model(a_and_b) ON UPDATE CASCADE

Context

  • Project name: BDD DS
  • Team name: Operations
  • Environment name: production
  • Database type: PostGres
  • Recent changes made on your end if any: added a different schema to the same project with otherwise same table names

And, if you are self-hosting your agent:

  • not self-hosintg

Hello @cmeng ,

Is there any structural difference between the “a_b_c” (not visible) collection and the visible collections ?

Can you confirm that the missing collection isn’t visible in the layout editor ?

Can you give me the real names of the collections, so I can identify them in your schema to have more info about the issue ?

Best Regards

Enki

Hi Enki,

From what I can tell no, no difference between the 1 that works and the 2 that do not. The weirdest part is that it was working previously (not sure when exactly it changed).

Thank you for the reply and your help!

The recent changes to the schema is most probably the cause of the issue

You said that it was working recently, what was displayed exactly in the details section ? what were labelled the relationship fields ?
What are the differences between the old and new schema ?

We continued this discussion in private, here is the resolution:
We found a bug in case of similar contraint names in multiple database schemas. We just released a fix and the reported issue is solved.