-
Notifications
You must be signed in to change notification settings - Fork 109
Photos version 5 database
Neil Pankey edited this page Jul 2, 2020
·
25 revisions
The full schema of the Photos 5 database is available here.
PhotosDB._process_database5()
reads the Photos.sqlite
file to extract all known metadata.
The primary tables of concern are:
Table Name | Description |
---|---|
ZGENERICASSET | The primary table with information on photo assets containing filename, directory, favorite, created date, etc. |
ZADDITIONALASSETATTRIBUTES | Additional info on photos including original name, title, etc. |
ZPERSON | Names of persons detected in photos |
ZDETECTEDFACE | Faces detected in photos |
ZGENERICALBUM | Information about albums |
Z_26ASSETS | Needed to join albums to photos 1 |
ZKEYWORD | Information about keywords |
ZASSETDESCRIPTION | The photo description (e.g. text typed into Photos by the user) |
ZUNMANAGEDADJUSTMENT | Information about edited photos |
ZINTERNALRESOURCE | Appears to be information on every internal resource used by Photos; used by osxphotos to find which photos are available locally or in iCloud |
ZCLOUDMASTER | Information about photos in iCloud; used to determine which photos have been synched to the cloud |
ZUNIFORMTYPEIDENTIFIER | Used to determine the UTI (file type) for photos in the library |
1: This may actually be a dynamically named table of the from Z_##ASSETS
as suggested by this post which has it as Z_23ASSETS
. Suspect that this may be derived from a type identifier since albums can have a "super class" and this would be a reference to the an album id.