ClassicPress PetitionsClassicPress Petitions
This is a read-only archive. Post or comment on the live version of this page on our forums.

Add UUIDs/GUIDs as candidate keys for all tables

March 15, 2019 · 05:50 · Mike Schinkel
Description

In working with some more complex WordPress sites that need to interact with other systems and synchronize data it's becoming clear that the lack of a properly maintained UUID/GUID makes that really, really hard. See:

https://stackoverflow.com/a/45479/102699

I am talking a candidate key here, not UUIDs/GUIDs as primary keys.

Voters
+3 more
Discussion
James Nylen

Yes, I can definitely see how this would be helpful. Another use case would be any kind of import/export process that needs to keep content in sync on an ongoing basis, for example for news networks with multiple location-based sites so that they can publish articles globally and/or locally.

Adding a new column is moderately easy (ensuring existing installs upgrade reasonably is the big difficulty there).

Using the UUID/GUID as the real primary key would be a lot more work, and probably a topic for another petition, but this could also be interesting. For example it would solve some of the problems with proposals to split post types out into their own tables: https://petitions.classicpress.net/posts/126/db-structure-each-cpt-should-have-their-own-datatable

James Nylen