Remove redundancy in MongoFields
Removes redundant data storage in mongodb, and moves/renames some fields for consistency #588 (closed).
-
Upload.name
is renamed toUpload.upload_name
, the field is removed fromCalc.metadata
to avoid redundancy, andupload_name
is used consistently in the api -
uploader
,published
andwith_embargo
fields are removed fromCalc.metadata
to avoid redundant storage in mongodb. The data is only stored on the upload level. - The field
Upload.published
is removed from mongodb, instead we check ifUpload.publish_time
is set. A property calledpublished
is created on Upload for convenience, so it is still possible to do things likeupload.published
(it's just not stored as a separate field in the DB). - Renamed
Calc.parser
toCalc.parser_name
for consistency (affects mongodb and api) - Removed
domain
fromCalc.metadata
(the field is either fetched from the parser (if the parser has a domain set) or from the archive files, if set by the parser) - Removed
processed
fromCalc.metadata
, instead we fetch this value by looking atCalc.process_status
- Removed
license
fromCalc.metadata
, and instead created alicense
-field on Upload. - Replacing the field
upload_time
withupload_create_time
in EntryMetadata - Adding
entry_create_time
andpublish_time
to EntryMetadata. - Replacing
Upload.create_time
andCalc.create_time
withUpload.upload_create_time
andCalc.entry_create_time
, for consistency