-
Notifications
You must be signed in to change notification settings - Fork 109
Feature request: Convert all IDs to v4 UUID #1
Comments
Thanks, that's interesting. I've never worked with UUID--what do you think is a good way to start converting the IDs? Get a series of random UUID and start plugging them in? |
Yep. If you were going to convert in one fell swoop, just assign v4 (random) UUIDs to each entry in the database and accept those IDs in place of the numerical ones. UUIDs can be generated easily in any programming language I know of as well as linux with |
There's also a discussion going on here: phalt/swapi#74 If you're not concerned about existing integrations, the couple of code lines there look like they would switch the whole API to UUID instead of Integer id. |
I just realized that ghibliapi doesn't have a database, so if you are willing to drop Integer ids, it's just a matter of changing the ids in the json file. If that sounds ok to you and you say yes, I'll do up a pull request. |
Sure, I'd appreciate it. |
A pleasant surprise as an API, thank you.
UUIDs have the benefits of being globally unique, which means that if someone brings in data from an API that returns a UUID, they can use that UUID as the internal ID as well.
If IDs are returned sequentially, the API caller have to create a different ID internally and then map it to the external ID for later updates.
The text was updated successfully, but these errors were encountered: