Migration Guide Template
Upgrade/migration guide: who is affected, SemVer basis, timeline with Deprecation and Sunset headers, breaking changes, checklist, steps, before/after code, verification, rollback
How to use: Use when a major version, API or platform change requires users to act. Fill who must migrate, the timeline and the breaking-changes table first, and keep dates identical to the deprecation notice and the Deprecation/Sunset headers. The main pitfall is missing a breaking change or omitting a rollback path.
Preview
Migration Guide: [Product name] [old version] to [new version]
Guide for users who must move from one major version, API or platform to another: who is affected, what breaks, when, and the exact steps to migrate, verify and roll back. Version numbers follow Semantic Versioning 2.0.0 (a breaking change needs a new major version; a deprecation ships in a minor release first). API deprecation and end of life are signalled with the HTTP
Deprecationheader (RFC 9745, March 2025) and theSunsetheader (RFC 8594, May 2019). In Diátaxis terms the step sections are a how-to guide; the tables are reference. Worked examples use Ledgerline 2.x to 3.0, a fictional invoicing platform with a REST API and a Python SDK. Replace every[bracketed]value and every row marked Example.
Document control
| Field | Value |
|---|---|
| Document ID | [DOC-MIG-001] |
| From version | [2.x] (Example: Ledgerline 2.9) |
| To version | [3.0] |
| Migration deadline | YYYY-MM-DD (Example: 2027-04-30) |
| Status | [Draft / In review / Published / Superseded] |
| Owner | [@release-manager] |
| Approvers / reviewers | [@product-owner], [@support-lead], [@tech-writer] |
| Last updated | YYYY-MM-DD |
| Classification | [Public] |
| Related | Deprecation Notice (docs/deprecation-notice), API Changelog (docs/api-changelog), Changelog (dev/changelog), Release Notes (dev/release-notes), Versioning and Release Policy (dev/versioning-release-policy), API Deprecation Policy (architecture/api-deprecation-policy) |
Approvals
| Role | Name | Decision | Date |
|---|---|---|---|
| Release manager | [@name] | [Approved / Changes requested] | YYYY-MM-DD |
| Support lead | [@name] | [Decision] | YYYY-MM-DD |
Revision history
| Version | Date | Author | Change summary |
|---|---|---|---|
| 0.1 | YYYY-MM-DD | [@name] | First draft from the 3.0 API changelog |
| 1.0 | YYYY-MM-DD | [@name] | Example: Published with the 3.0 release and deprecation notice |
| 1.1 | YYYY-MM-DD | [@name] | Example: Added BC-06 found during beta; FAQ on side-by-side running |
Contents
1. Who must migrate
You must migrate if any of these apply:
- You run [Product name] [2.x] self-hosted, or
- You call the API with the header
Example-Version: 2024-*, or your API responses carry aDeprecationheader, or - You use the [Python SDK below 5.0 / JavaScript SDK below 6.0].
You are not affected if you use only the hosted web app; it was upgraded automatically on
YYYY-MM-DD. To check your version, run [product] --version or look at Settings > About.
2. Why this change
Version [3.0] replaces [the legacy XML import pipeline] with [a streaming JSON pipeline], which [cuts import time by about 60% on files over 100 MB in our benchmark] and removes [the dependency on an unsupported library with known vulnerabilities]. Several older options were removed to make configuration consistent. Because these changes are not backward compatible, they ship as a new major version under Semantic Versioning 2.0.0.
3. Timeline
| Date | Milestone | What happens |
|---|---|---|
| 2026-11-01 (Example) | [3.0] released; [2.x] deprecated | New version available; [2.x] gets security fixes only; API responses for [2.x] carry Deprecation and Sunset headers |
| 2027-04-30 (Example) | Migration deadline | Last day [2.x] receives security fixes |
| 2027-05-01 (Example) | [2.x] end of life | API version rejected with 410 Gone; no support |
From the deprecation date, every response to a [2.x] API request carries these headers:
HTTP/1.1 200 OK
Deprecation: @1793491200
Sunset: Sat, 01 May 2027 00:00:00 GMT
Link: <https://example.com/docs/migrate-2-to-3>; rel="deprecation"; type="text/html"
@1793491200 is 2026-11-01 00:00:00 UTC as a Structured Field Date (RFC 9745). Sunset uses
the HTTP-date format (RFC 8594) and must not be earlier than the deprecation date. The deprecation
link relation, defined in RFC 9745 section 3, points to this guide. Clients can log a warning
whenever they see the Deprecation header.
4. Breaking changes
| ID | Area | Old (2.x) | New (3.0) | Impact if not changed | Action |
|---|---|---|---|---|---|
| BC-01 (Example) | Configuration | import.format: xml | import.format: json | Startup error | Convert files (6.3) |
| BC-02 (Example) | API | GET /items?page=2 | GET /items?starting_after=<id> | 400 Bad Request | Use cursor pagination (6.4) |
| BC-03 (Example) | API | amount as string "12.50" | amount as integer 1250 (minor units) | Wrong amounts if parsed as decimal | Multiply by 100 (6.4) |
| BC-04 (Example) | SDK | client.get_items() | client.items.list() | AttributeError | Rename calls (6.4) |
| BC-05 (Example) | Runtime | Python 3.9 supported | Python 3.11 minimum | Install fails | Upgrade Python (5) |
| [BC-nn] | [Area] | [Old] | [New] | [Impact] | [Action] |
4.1 Deprecated but still working
| ID | Feature | Replacement | Removal planned |
|---|---|---|---|
| DEP-01 (Example) | --legacy-auth flag | OAuth device flow | [4.0] |
| DEP-02 (Example) | item.created timestamp in seconds | item.created_at ISO 8601 | [4.0] |
5. Pre-migration checklist
| # | Item | Done |
|---|---|---|
| 1 | Read every breaking change in section 4 and mark the ones that apply | [ ] |
| 2 | Take a full backup and confirm it restores | [ ] |
| 3 | Upgrade runtime to [Python 3.11+ / Node.js 22+] | [ ] |
| 4 | Prepare a staging environment with a copy of production data | [ ] |
| 5 | Search your code for old calls: grep -rn -e get_items -e "page=" src/ | [ ] |
| 6 | Search your API client logs for responses with a Deprecation header | [ ] |
| 7 | Schedule a maintenance window of about [1 hour] | [ ] |
| 8 | Tell users and dependent teams the date and expected impact | [ ] |
6. Migration steps
6.1 Upgrade the package
pip install "example-sdk>=5.0,<6"
[product] --version
Expected output: 3.0.x.
6.2 Run the automated migration tool
The tool rewrites configuration and reports what it could not change.
[product] migrate --from 2 --to 3 --dry-run
[product] migrate --from 2 --to 3
Review migration-report.md; every line marked MANUAL needs a step below.
6.3 Convert configuration (BC-01)
Before:
import:
format: xml
batch: 500
After:
import:
format: json
batch_size: 500
6.4 Update code (BC-02, BC-03, BC-04)
Before (2.x):
page = 1
total = 0.0
while True:
items = client.get_items(page=page)
if not items:
break
for item in items:
total += float(item["amount"])
page += 1
After (3.0):
total_minor = 0
for item in client.items.list().auto_paging_iter():
total_minor += item.amount # amount is now an integer in minor units
total = total_minor / 100
Summing integers and dividing once avoids floating-point drift across many items.
7. Data migration
On first start, [3.0] converts stored records to the new schema. Time needed is roughly linear in the number of records: minutes, so about 20 minutes for one million records (Example, measured on the reference staging host). The service is read-only during conversion.
| Data | Change | Reversible |
|---|---|---|
| Items (Example) | amount decimal converted to integer minor units | Yes, by restoring backup |
| Import history (Example) | XML payloads archived to archive/ | Yes |
| Sessions (Example) | Cleared; users sign in again | Not needed |
8. Verification
| Check | Proves | How | Pass condition |
|---|---|---|---|
| Version | 6.1 | [product] --version | 3.0.x |
| Record count | Section 7 | Compare SELECT count(*) FROM items before and after | Equal |
| Totals | BC-03 | Sum of old decimal amounts multiplied by 100 equals sum of new integer amounts | Equal |
| API | BC-02 | Call GET /items?limit=1 with new headers | 200 OK, no Deprecation header |
| Logs | 4.1 | Search for DEPRECATED | No matches from your code |
9. Rollback
Roll back if verification fails or error rates rise above [2%] within [one hour]. Steps:
- Put the service in maintenance mode.
- Reinstall [2.x]:
pip install "example-sdk<5". - Restore the backup from the pre-migration checklist.
- Restore the old configuration from version control.
Data written after the migration started is lost on rollback; export it first with
[product] export --since "YYYY-MM-DD HH:MM" if needed. Rollback is possible only until the
end-of-life date in section 3.
10. FAQ
Can I skip from 1.x straight to 3.0? No. Migrate to [2.9] first, then follow this guide.
Can 2.x and 3.0 run side by side? Yes, against separate databases. They cannot share one database after conversion.
Will my API keys keep working? Yes. Only the Example-Version header and the response formats
change.
What if I miss the deadline? Your integration keeps working until end of life, but without
security fixes. After end of life, API calls fail with 410 Gone.
11. Getting help
Ask in [the migration discussion forum] or contact [support@example.com] with your
migration-report.md, current version and the failing step.
12. References
| Source | Version checked | Used for |
|---|---|---|
| Semantic Versioning, https://semver.org/ | 2.0.0, checked 2026-10-29 | Major version for breaking changes; deprecate in a minor release first |
| RFC 9745, The Deprecation HTTP Response Header Field, https://www.rfc-editor.org/rfc/rfc9745.html | Standards Track, March 2025, checked 2026-10-29 | Deprecation header and deprecation link relation |
| RFC 8594, The Sunset HTTP Header Field, https://www.rfc-editor.org/rfc/rfc8594.html | Informational, May 2019, checked 2026-10-29 | Sunset header |
| Diátaxis, Daniele Procida, https://diataxis.fr/ | Checked 2026-10-29 | How-to and reference forms |
Standard and licence note
Based on common industry practice for upgrade and migration guides (impact first, breaking-change table, timeline, steps, verification and rollback), Semantic Versioning 2.0.0 (CC BY 3.0), and the IETF specifications RFC 9745 and RFC 8594 (header names and formats cited, not reproduced). The documentation forms follow the Diátaxis framework by Daniele Procida (CC BY-SA 4.0); only its concepts are used. The text of this template is original. Check the current official versions before relying on this guide. Template licence: MIT.
Related templates
Administrator Guide Template (ISO/IEC/IEEE 26514)
Admin guide – roles, architecture, access, backup/restore, monitoring, maintenance, scaling, security ops, DR, audit
Documentation & SupportDeveloper and SDK Guide Template
Developer guide: setup, auth, multi-language quick start, errors, pagination, rate limits, webhooks, sandbox, OpenAPI/Arazzo/Overlay descriptions, versioning
Documentation & SupportDocs Contribution Guide Template (Vale, markdownlint)
Docs-as-code contributing: repo layout, PR flow, preview, front matter schema, Vale vocabularies, markdownlint-cli2, link checks, alt text, review, release