OpenConceptLab / ocl_issues

Issues for all OCL repos. NOTE: Install ZenHub Browser Extension and request access to the OCL Roadmap board to view all issues and to contribute
4 stars 1 forks source link

Rename `uuid` field to `id` for concept names and descriptions #1671

Open paynejd opened 1 year ago

paynejd commented 1 year ago

@snyaggarwal We need to understand the impact of this change before we pull the trigger

concept.name.uuid and concept.description.uuid are incorrectly named because these are actually local database identifiers, not UUIDs. id is the correct name for these fields.

Can you take a look at the impact that changing these field names would have throughout the api and TB?

Are there other uses of uuid in the API information model?

snyaggarwal commented 1 year ago

@paynejd uuid was added to support backword compatibility when we migrated to v2 (MongoDB to Postgres). v1 had 'uuid' (BSON ID via MongoDB) attached to each object, which was replaced by an autoincremented Integer ID in v2 (Postgres pk autoint).

The DB still has the field name as "id", but the API reports it as "uuid". So the impact is much less internally in OCL, they are hardly used anywhere, except a couple of places in TB (not in display, but in code).