Files
fleet/server
George Karr f2fca57c44 Renumber 4.86 migrations after the 4.85.1 cherry-pick (#46079) (#46097)
## Summary

Fixes #46079.

Migration `20260518194422_AddEncodingTypeToHostSCDData` was
cherry-picked into the 4.85.1 patch release. Customers upgrading from
4.85.1 → 4.86.0 then saw `WARNING: Your Fleet database is missing
required migrations` for 11 migrations that landed on `main` with
earlier timestamps but never shipped in 4.85.1.

This PR renumbers those 11 migrations to run after `20260518194422` and
regenerates `schema.sql`:

| Old timestamp | New timestamp | Name |
|---|---|---|
| 20260427134220 | 20260522195224 |
AddPreserveHostActivitiesOnReenrollmentToAppConfig |
| 20260428125634 | 20260522195225 |
AddManagedLocalAccountRotationColumns |
| 20260429180725 | 20260522195226 | CreateTableAppConfigurations |
| 20260430103635 | 20260522195227 | AddRequireAllToPolicyAndQueryLabels
|
| 20260506132626 | 20260522195229 | AddVPPCountryCode |
| 20260506171058 | 20260522195230 |
AddSubjectAlternativeNameToCertificateTemplates |
| 20260512143542 | 20260522195231 | AddOrbitDebugUntilToHosts |
| 20260512173249 | 20260522195232 | CreateTableVPPClientUsers |
| 20260512173250 | 20260522195233 | AddManagedAppleIDToHostMDM |
| 20260518124441 | 20260522195234 |
AllowNullTypeOnHostMDMManagedCertificates |
| 20260518150028 | 20260522195235 | AddOriginToHostCertificates |

This will be cherry-picked into `rc-minor-fleet-v4.86.0` once merged.

## Test plan

- [x] `go build ./...` passes
- [x] All 11 migrations run cleanly in order during `make
dump-test-schema`
- [x] No references to the old timestamps remain in the repo
- [ ] Spin up 4.85.1, run migrations, then run the 4.86.0 binary built
from this branch and confirm no `missing required migrations` warning

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Reorganized database migration sequencing to ensure consistent schema
updates during deployment.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/fleetdm/fleet/pull/46097?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-22 15:11:00 -05:00
..