Open jmurty opened 7 years ago
In the case of the AGSA sync for image files/records, the external reference's continuing to get murkier, as it now relies on four values:
The EMU records contain data such as title and rights, so we need to sync these sporadically.
In GLAMkit we have a number of models that can be imported from external data sources: images, events and occurrences, collection models.
Currently all these models share an
external_ref
character field that, by convention, is used to store an external reference that we can use in API operations or data import scripts to uniquely identify and cross-reference records imported from external systems.However, there are two problems with this approach:
external_ref
field itself is defined in multiple places, and can have different characteristics, such as maximum size values (Image.external_ref
is larger since #251). These inconsistencies are likely to confuse and/or stymie us in the futureexternal_ref
character field is not always enough information to disambiguate and cross-check records between GLAMkit and external systems. In some cases we bake external system modification times into this field, where such data should instead be in extra DB fields specific for that purpose.I propose that we consolidate all the externally-referrable models to be consistent and DRY by:
external_ref
field in that base model, and update all other referrable models to use the base model:external_dt_modified
andexternal_dt_created
fieldsAs part of the consolidation, we could also take the chance to:
external_ref
field to something clearer likeexternal_reference
orexternal_identifier
The main drawbacks with all these changes is it would mean: