-- Discovery of metadata during a listing, loading, deposit or external_catalog of an origin -- also provides a translation to a defined json schema using a translation tool (indexer_configuration_id) create table origin_metadata( id bigserial primary key-- PK object identifier origin_id bigint not null references origin(id), date timestamptz not null, provenance text not null, -- TODO use an enum (?) raw_metadata jsonb not null, translated_metadata jsonb, indexer_configuration_id bigint, ); -- NOTES: -- translation_date is not needed because we wish to translate on the fly -- having origin_metadata and origin_metadata_history tables is redundant and inefficient