I have a weird behaviour while trying to set Primary Keys/Foreign Keys in my database.
I have a table, "Table_1" which historically had as PK the field "user_id". In reality, it has another unique identifier "user_UUID", but which was set as "Category" because at first, I didn't need to set it as a Foreign Key of another table, when I needed to do so for "user_id".
I recently modelized a new table in the same schema, which among other fields has "user_UUID". So I wanted to set is as FK "user_UUID" of "Table_A1" in the metadata. To do so , Metabase requires this field to be set as Primary Key in the origin table (which is my first question : is it mandatory to link a FK to a PK ? It's not the SQL standard if I'm not mistaken)/
Anyway, I set "user_UUID" as second PK of my "Table_1", so that the FK link could be possible, and it worked.
Normally it's not logical to have 2 primary keys in a same table but Metabase seems to allow it, and doing so I could add a FK link in my new table.
The problem is that now, in some historical dashboards/questions that have "user_UUID" as possible filter, filtering seems to be broken. At first sight, it seems to work*
but when I enter in the settings of dashboard, I have "unknown field" in red. So I'm not even sure that the filter works.
Is it normal ? Am I trying to do an impossible thing to have 2 primary keys, which leads Metabase to have a weird reaction ?
I'm on Metabase V.50.25 for info.