This document serves as a list of integrity checks that should be implemented in an official integrity module.
Disable disk cache for checking
Foreach entity describeEntity entity and check that each table contains a row for this entity (e.g. by loading the entity)
Foreach entity table verify that there's a corresponding entry in the Entity table
- ChildEntity.parentId -> Entity.id - Derivative.derivativeSourceId - Entity.linkId -> Entity.id && entityType must be the same - Comment.commenterId -> User.id - AlbumItem.theme -> PluginMap.pluginId && active
For Maps too...
- UserGroupMap.userId -> User.id - UserGroupMap.groupId -> Group.id - AccessMap.userOrGroupId -> Entity.id - AccessSubscriberMap.itemId -> Item.id - AccessSUbscriberMap.accessListId -> AccessMap.accessListId - CustomfieldMap.itemId -> Item.id - PluginParameterMap.itemId -> Entity.id - DerivativePrefsMap.itemId -> Item.id - DescendentCountsMap.userId -> User.id - DescendentCountsMap.itemId -> Item.id - ExternalIdMap.entityId -> Entity.id - ExternalIdMap.entityType -> describeEntity hit (no miss) - G1MigrateMap.itemId -> Item.id - etc.
Foreach FilesystemEntity as entity file_exists entity.fetchPath() Foreach g2data/albums/ as logicPath verify that a corresponding FilesystemEntity exists for logicPath
Foreach g2data/ as file is_writeable file