openly-rails
openly-rails copied to clipboard
Drop redundant fields from VCS::FileInBranch
VCS::FileInBranch replicates some fields from current_version:
- parent_id
- name
- mime_type
- content_version
- is_deleted
- thumbnail_id
These fields should be removed and the attributes be taken from current_version. This will avoid potential data inconsistency.
For dropping parent_id, we need to check its consequences. The parent_id here is a reference to a VCS::FileInBranch. It is not the same as the parent_id in current_version which refers to a VCS::File.