refactor database table structure and associations for user-provided records within a collection. proposed new structure, outlined below after discussion with data engineer Joel, will do the following:
reintroduce image files and html files as distinct but related entities
add four new tables
document
document_core_file
document_image_file
document_html_file
replace direct habtm association between core_file and collection with direct association between core_files, html, and image files with document association through which each of these entities is indirectly associated with collection(s)
proposed structural refactor
document
belongs to many collections
represents what a core file is (supposed to be) now, just simpler; a grouping of individual attachments assembled and presented to the user
in the future, whenever a new ‘core file’ would have been created, a document is created instead
columns
id
title
depositor_id
description
visibility (public or private)
document_collection
belongs_to document
belongs_to collection
columns
document_id
collection_id
core_file
attached tei
xml files exclusively
belongs to many documents, through document_core_files
belongs_to depositor
add’l columns
ography_type
document_core_file
belongs_to document
belongs_to core_file
columns
document_id
core_file_id
image_file (formerly image_master)
attached image file
.jpeg, .jpg, .gif, or .png format exclusively
belongs to many documents, through document_images
task
refactor database table structure and associations for user-provided records within a collection. proposed new structure, outlined below after discussion with data engineer Joel, will do the following:
proposed structural refactor