@burdyle I think you’re over-complicating the problem at hand a little.
I also don’t really understand why you would rename a platform. If by “platform” you mean something like PlayStation 5, why would you need to “rename” that in your application?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I took the "Build a Video Game Aggregator" course, and it inspired me to create an app to manage data using IGDB as practice.
I decided to start by managing different platforms, but I'm having difficulty finding the optimal structure.
For example, I want to fetch different platforms from the IGDB API and add them to my database, but I also want the possibility to modify some information.
Here's a use case: I change the name of a platform and need to ensure that the name is unique. Additionally, I want the ability to revert to the original name fetched from IGDB. I also want to update all platforms via IGDB without overwriting my modifications.
What would be the best way to structure the database for platforms? I was thinking of having a single table called "Platforms" with a "name" field and another field like "custom_name" if I modify it. Or should "Platforms" be a pivot table with "ApiPlatform" and "CustomPlatform" tables, and in the "Platform" model, have a getter getNameAttribute that returns $this->custom->name ?? $this->api->name?
I'm fairly new to database structuring, so I imagine there might be a better way to go about this!
Thanks in advance for your help! 😊
@Burdyle Then yes, have two columns: one to hold the “original” name and a second to hold a custom name.
Please or to participate in this conversation.