Versions Compared

Key

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

The Problem (as stated in https://discuss.folio.org/t/reference-data-and-upgrades/2858)

...

  1. The upgrade process should leave the system in a usable state unless a truly fatal error is encountered.
    1. Rigorous error handling in upgrade scripts to ensure trivial errors do not derail process
    2. When fatal errors occur, the output should clearly indicate where the error occurred.
  2. The upgrade process should produce a log output of changes made.
  3. The upgrade process should be able to run in a simulated mode to facilitate planning.
  4. The upgrade process should account for the presence of Overlay Data non-system data and preserve it entirely.

...

NameDefinition/notesOverwritten on upgradeImmutable (towards system operator)Example of data stored
System Data

Data necessary for operation of the system. These should be values that are immutable toward the user or system operator. Example: sane defaults for field labels.

Note: at present, these sort of default values for certain modules are only loaded when you specify LoadReferenceData=true on module initialization. This proposes we move those into an immutable category.

YESYESschema_book{
  • title(string,128)
  • subtitle(string,256)
  • authors(string,128)
  • publisher(string,128)
  • release_date(integer,4)
  • blurb(string,32768)

}

Overlay Data

Data that may be used to supersede System Data when a user or system operator wants to change something immutable Example: a default field label.

Can be used to override any System Data, as well as introducing new values.

NO

NO

schema_book{
  • uuid(integer,64)
  • subtitle(NA)
  • authors(string,256)
  • release_date(string,64)

}

Sample Data/User Data

Data that can be used to demo the system or is useful for providing examples to users.

Data entered by users specific to an institution.

This data is not necessary for the operation of the system. Example: a user record for a fake (or real) patron.

This layer also holds sample data, since it's essentially real data for a fictional tenant.

NO

To load example data (like diku), introduce another switch (LoadExampleData=true)

NO

book:

uuid: asdf034

title: 1984

authors: George Orwell

publisher: Secker & Warburg

release date: June 8, 1949

blurb: Nineteen Eighty-Four: A Novel, often published as 1984, is a dystopian novel by English novelist George Orwell. It was published on 8 June 1949 by Secker & Warburg as Orwell's ninth and final book completed in his lifetime.

--- Result ---


schema_book{

  • uuid(integer,64)
  • title(string,128)
  • authors(string,256)
  • publisher(string,128)
  • release_date(string,64)
  • blurb(string,32768)

}

book:

uuid: asdf034

title: 1984

authors: George Orwell

publisher: Secker & Warburg

release date: June 8, 1949

blurb: Nineteen Eighty-Four: A Novel, often published as 1984, is a dystopian novel by English novelist George Orwell. It was published on 8 June 1949 by Secker & Warburg as Orwell's ninth and final book completed in his lifetime.



Proposal Two

  • Create a data layer on top of reference data that allows users to overlay system-provided values with local values. This will prevent overwriting user-specified values when performing system upgrades.

...