fleet/server/datastore
Jonathan Katz 2f951b06a8
Add migration to fix mismatched software titles (#40078)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves: #35528 (followup)
This migration should fix `.pkg` installers that have a mismatched
software title, as well as software (versions) that are using the wrong
title. It's a little bit risky, as it could modify `software`,
`software_installers`, and `software_titles` data.

For software versions it just checks if the title's source is not the
same as the software. For installers it uses installers with
platform=`darwin` where the title's source isn't `apps`, which should
probably be the only case after the previous migration to convert titles
with source `pkg_packages` to `apps`.

Changefile was already added for 35528 in a previous PR.

# Checklist for submitter

## Testing

- [x] Added/updated automated tests
- [ ] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)

- [x] QA'd all new/changed functionality manually
2026-02-19 11:39:04 -05:00
..
cached_mysql Okta IdP factor (#35143) 2025-11-07 16:19:25 -06:00
failing Cloudfront signing for in-house apps (#37650) 2026-01-05 16:30:31 -05:00
filesystem Cloudfront signing for in-house apps (#37650) 2026-01-05 16:30:31 -05:00
mysql Add migration to fix mismatched software titles (#40078) 2026-02-19 11:39:04 -05:00
mysqlredis Add activity feed entries for host deletion and expiration (#34720) 2025-10-31 09:37:31 -07:00
redis New rate limit algorithm for Fleet Desktop endpoints (#33344) 2025-09-26 15:03:50 -03:00
s3 Cloudfront signing for in-house apps (#37650) 2026-01-05 16:30:31 -05:00