diff --git a/Photos-version-5-database.md b/Photos-version-5-database.md index 4bdbad4..4ff9096 100644 --- a/Photos-version-5-database.md +++ b/Photos-version-5-database.md @@ -47,6 +47,19 @@ If you change the sort order manually, the value of `Z_FOK_34ASSETS` of the phot See also the [discussion in #184](https://github.com/RhetTbull/osxphotos/issues/184) +If you sort albums using the View | Sort menu, `ZGENERICALBUM.ZCUSTOMSORTKEY = 1` and: + +For sort by newest first: +`ZGENERICALBUM.ZCUSTOMSORTASCENDING=0` + +For sort oldest first: +`ZGENERICALBUM.ZCUSTOMSORTASCENDING=1` + +Sorted by Title +`ZGENERICALBUM.ZCUSTOMSORTKEY=5` + +If manually sorted, `ZGENERICALBUM.ZCUSTOMSORTKEY=0` and the `Z_FOK_34ASSETS` column is updated. + ## Import Sessions Import sessions are stored in `ZGENERICALBUM` with `ZKIND = 1506`. When a photo is imported, the value ZGENERICASSET.ZIMPORTSESSION is set to the primary key of the corresponding import album in `ZGENERICALBUM`. `ZIMPORTSESSION` may be `null` meaning there is no associated import session.