Updated Photos version 4 database (markdown)

Rhet Turnbull
2020-07-06 01:16:29 -07:00
parent ef07ea0193
commit a9d62a1231

@@ -1 +1,15 @@
The full schema for Photos 4 databases can be found [here](https://github.com/RhetTbull/osxphotos/wiki/Photos-4-database-schema).
The full schema for Photos 4 databases can be found [here](https://github.com/RhetTbull/osxphotos/wiki/Photos-4-database-schema).
### Albums
#### Album Sort Order
Sort order of photos in albums is not yet supported by `osxphotos`. The sort order appears to be in table `RKCustomSortOrder`.
The highlighted rows in screenshot below show 4 photos in an album with default sort order. Note the `orderNumber` column uses a similar scheme as in Catalina (start at 1024 and increment by 2^10). `containerUuid` is the album UUID (`RKAlbum.uuid`) and `objectUuid` is the photo UUID (`RKVersion.uuid`).
<img width="718" alt="Screen Shot 2020-07-06 at 12 33 19 AM" src="https://user-images.githubusercontent.com/41546558/86567993-0d870580-bf21-11ea-9372-110826bdd888.png">
In screenshot below, I manually re-sorted the images, moving the last image (uuid = 6bxcNnzRQKGnK4uPrCJ9UQ) to the beginning of the album. Note it's `orderNumber` changed from 4096 to 1536, placing it first in the album.
<img width="517" alt="Screen Shot 2020-07-06 at 12 35 30 AM" src="https://user-images.githubusercontent.com/41546558/86568007-11b32300-bf21-11ea-98a0-30adc45006e7.png">