Integrity Check

Codebook includes an Integrity Check feature which identifies and corrects historical problems with data in your Codebook database due to bugs that have been fixed, and recovers any orphaned records that may be in your database but assigned to a Category or Entry that has been deleted on another device.

After Integrity Check completes it will report any issues it found and repaired. Any repairs made to your database will propagate to your other devices when you next use the Sync feature.

On android

  1. Launch Codebook and log in
  2. Tap on Home > Settings
  3. Tap on Integrity Check

On ios

  1. Launch Codebook and log in
  2. Tap on the Settings tab (on iPhone, tap More > Settings in the tab bar)
  3. Tap on Perform Integrity Check

On macos

  1. Launch Codebook and log in
  2. Click on the File menu in the Menu Bar
  3. Click on Integrity Check

On windows

  1. Launch Codebook and log in
  2. Click on the File menu at the top of the Main Window
  3. Click on Integrity Check

These are issues in the database that could be caused by bugs in previous versions of Codebook, and are repaired by running Integrity Check:

  • Dates stored in an incorrect format including the meridian are repaired
  • Entries missing a flag for Favorite status are explicitly set to False
  • Fixes Note entries that are missing the Note icon

Orphaned records are Entries, Fields, or Attachments that exist in your database but are not shown in the user interface because they are no longer assigned to a Category or Entry. This happens when you add or edit Entries or Fields on one device, and delete their parent Category or Entry on another device, and then Sync the changes together. The orphaned records are then present on both devices, but disconnected from the data model. Integrity check looks for these orphaned records and recovers them in the interface as follows:

  • Entries with no Category are moved to the Unfiled category
  • Fields with no Entry are moved to the Orphaned Fields entry in the Unfiled category
  • Image Attachments with no Entry are moved to the Orphaned Images entry in the Unfiled category
  • Adjusts any Fields missing a Label to a default plain-text Label of Unknown

Codebook keeps track of the order to display Fields on an Entry by maintaining an index on each Field, updating those indexes when you add, delete, and rearrange Fields. If you change the order of the Fields on the same Entry on two different devices and then Sync your changes, Codebook will do its best to display the Fields in the order you intended, but the indexes may be technically incorrect in the database until the next time you edit the Fields list (e.g. two fields with index 2). Integrity Check looks for such sort index discrepancies and repairs them.

While Codebook does not allow for rearranging Image Attachments on the Images view of an Entry, it does keep track of the indexes of them as they are added to and deleted from an Entry. If you add and remove images on the same Entry on two different devices and then Sync your changes, the indexes could potentially be technically incorrect in the database. Integrity Check also looks for and corrects these indexes.