You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a schema and then attempting to import the schema into another environment we get the following error A primary key should not be a foreign key.
We have two collections that have a one-to-one relationship with each other, meaning they both share the same primary key, however since Directus needs to to know which fields to use in the relation we have set them as the relation fields. This works as we want on the first environment but we are unable to sync this using the Directus schema.
To Reproduce
Not sure if you'll be able to achieve this using Directus, but with out existing tables with the following structure (simplified)
events: id(pk), name (string)
event_config: event(pk & fk), settings (json)
We mapped the event field to the events collection as a m2o relationship in order to get the select interface, and that seems to have worked.
Directus Version
10.10.7
Hosting Strategy
Self-Hosted (Docker Image)
Database
Mysql
The text was updated successfully, but these errors were encountered:
Describe the Bug
When creating a schema and then attempting to import the schema into another environment we get the following error
A primary key should not be a foreign key
.We have two collections that have a one-to-one relationship with each other, meaning they both share the same primary key, however since Directus needs to to know which fields to use in the relation we have set them as the relation fields. This works as we want on the first environment but we are unable to sync this using the Directus schema.
To Reproduce
Not sure if you'll be able to achieve this using Directus, but with out existing tables with the following structure (simplified)
events: id(pk), name (string)
event_config: event(pk & fk), settings (json)
We mapped the event field to the events collection as a m2o relationship in order to get the select interface, and that seems to have worked.
Directus Version
10.10.7
Hosting Strategy
Self-Hosted (Docker Image)
Database
Mysql
The text was updated successfully, but these errors were encountered: