Remove redundancy in MongoFields
Removes redundant data storage in mongodb, and moves/renames some fields for consistency #588 (closed).
-
Upload.nameis renamed toUpload.upload_name, the field is removed fromCalc.metadatato avoid redundancy, andupload_nameis used consistently in the api -
uploader,publishedandwith_embargofields are removed fromCalc.metadatato avoid redundant storage in mongodb. The data is only stored on the upload level. - The field
Upload.publishedis removed from mongodb, instead we check ifUpload.publish_timeis set. A property calledpublishedis 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.parsertoCalc.parser_namefor consistency (affects mongodb and api) - Removed
domainfromCalc.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
processedfromCalc.metadata, instead we fetch this value by looking atCalc.process_status - Removed
licensefromCalc.metadata, and instead created alicense-field on Upload. - Replacing the field
upload_timewithupload_create_timein EntryMetadata - Adding
entry_create_timeandpublish_timeto EntryMetadata. - Replacing
Upload.create_timeandCalc.create_timewithUpload.upload_create_timeandCalc.entry_create_time, for consistency