The native ingesters (Discord, Patreon, SubscribeStar) import a post's
media before its record. Only the record (`_post.json`) carries the
date: the Discord message timestamp, or the Patreon/SubscribeStar
published_at. So each image was linked to a post with no date yet, and
it kept its download time in both gallery date columns. The post itself
was dated correctly once the record landed, but nothing went back to
update its images.
- upsert_post_record now re-dates the images already linked to the
post. `effective_date` becomes the primary post's date, and
`earliest_post_date` the earliest dated post the image is in, which
are the same rules _attach_provenance applies.
- Migration 0113 repairs the library from the posts. It writes only
rows that differ.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVjrnpQjRgHdvq95rASoiR