strapi

STRAPI CMS: OneToOne Relation Problem from one Collection


so i have the following problem at my strapi project: I have a Collection called Player (Many Names) and a Component called Substitution. Inside the Component i want to just select 2 Players from the Players Collection in 2 seperated fields. (PlayerOut, PlayerIn). So i'd say its a normal substitution case, but Strapi can't handle that i put 2 relations on one Collection.

ErrorMSG: [543] ERROR:  relation "components_live_feed_elements_exchange_elements_player_1_links_" already exists
strapiDB  | 2024-07-09 07:24:29.144 UTC [543] STATEMENT:  create index "components_live_feed_elements_exchange_elements_player_1_links_inv_fk" on "public"."components_live_feed_elements_exchange_elements_player_1_links" ("player_id")

I rebuilt the "Problem" with a plain database --> no problems

I use a Postgres


Solution

  • It seems "components_live_feed_elements_exchange_elements_player_1_links_" is getting cut off. see this issue

    (specifically strapi seems to crate a constraint with identifier components_live_feed_elements_exchange_elements_player_1_links_inv_fk which is 69 characters and postges has a limit of 63)