Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • packagecollection
  • formatting
  • bag → collection api updates
  • rest model review
  • s/package_layout/file_layout

Database Migrations

Bag Table

...

New Table: collection_version


Column

Type

Comment

+

id

bigint

Primary key for the table

+

collection_id

bigint

Id for joining version information to a collection

+

number

bigint

Natural number which can be incremented for determining the numbered version of a collection

+

created_at

datetime

Date at which the collection version was created

File Level

The Ingest Server currently tracks Files and associated metadata in the form of Fixity and ACE Tokens. If files are to be updated, then they also need some type of version information. It is likely that both the Fixity and ACE Token tables will need some information as to what version of a File they are pointing to, and likewise a File will need to know what the latest version is. As we do not update Files separately from the collections which they belong to, piggy backing off of the collection_version will likely be the best choice to make here. In order to do this, we can add additional columns to the fixity and ace_token tables for the collection_version_id

Updated Table: fixity table updates (might remove uniq idx)


Column

Type

Comment

+

collection_version_id

bigint

Indicate the collection version which this fixity (and by proxy file) belongs to

+

(file_id, collection_version_id)

Unique index

Index and indicate uniqueness of files to the collection_id


Updated Table: ace_token (might remove uniq idx)


Column

Type

Comment

+

collection_version_id

bigint

Indicate the collection_version which this ace_token belongs to

+

(file_id, collection_version_id)

Unique index

Index and indicate uniqueness of files to the collection_id


Normalization Opportunities

...

A plain text listing of Files and their Fixity values. Originally was going to be just the Files, but since metadata files can change it is important to include the Fixity as well.

Example

db84dd4fb5dfc0cef5f0509e9e910ee6f416c2df  data/manifest.txt
d96f61bfe6f832dad3a73c09bb177967282c2400  data/content-properties.json
20c59b1614adc782c889301ba6f2bb46e998fab7  data/.collection-snapshot.properties

 

API Model Updates

  • Bag
    • Add package_layout
    • Rename to Collection
  • BagCreate rename to CollectionCreate
  • BagStatus rename to CollectionStatus

...