Skip to content

Commit 0b291ea

Browse files
Maffoochclaude
andcommitted
docs(upgrade): fix migration numbers and the redundant migrate_cwe step (F10)
- Update the migration list to the renumbered chain (0280-0284). - Remove the contradiction: 0284_backfill_finding_cwe already backfills every existing finding automatically, so migrate_cwe is NOT a required upgrade step (it would repeat that work). Reframe migrate_cwe as an optional, idempotent re-scan for later use (e.g. after a parser CWE change). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a3af3c2 commit 0b291ea

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

  • docs/content/releases/os_upgrading

docs/content/releases/os_upgrading/3.2.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,23 @@ finding's CWE field, plus any additional CWEs a parser supplies). The finding ex
3737

3838
Five migrations run automatically on upgrade:
3939

40-
- `0276_vulnerability_id_type` — adds the indexed `vulnerability_id_type` column and a leading
40+
- `0280_vulnerability_id_type` — adds the indexed `vulnerability_id_type` column and a leading
4141
index on `vulnerability_id`.
42-
- `0277_backfill_vulnerability_id_type` — backfills `vulnerability_id_type` and removes duplicate
42+
- `0281_backfill_vulnerability_id_type` — backfills `vulnerability_id_type` and removes duplicate
4343
`(finding, vulnerability_id)` rows (keeping the earliest).
44-
- `0278_unique_finding_vulnerability_id` — adds the unique constraint on `(finding, vulnerability_id)`.
45-
- `0279_finding_cwe` — creates the `Finding_CWE` table (unique per `(finding, cwe)`).
46-
- `0280_backfill_finding_cwe` — seeds `Finding_CWE` rows from the legacy `Finding.cwe` values.
44+
- `0282_unique_finding_vulnerability_id` — adds the unique constraint on `(finding, vulnerability_id)`.
45+
- `0283_finding_cwe` — creates the `Finding_CWE` table (unique per `(finding, cwe)`).
46+
- `0284_backfill_finding_cwe` — seeds `Finding_CWE` rows for all existing findings from their
47+
legacy `Finding.cwe` values.
4748

4849
### What you need to do
4950

50-
The migrations are applied automatically. New and edited findings populate their CWE relationship
51-
automatically. To backfill `Finding_CWE` rows for **existing** findings, run the idempotent command
52-
after upgrading:
51+
Nothing — the migrations are applied automatically, `0284_backfill_finding_cwe` backfills every
52+
existing finding, and new/edited findings populate their CWE relationship on save and import.
5353

54-
```
55-
manage.py migrate_cwe
56-
```
54+
The `manage.py migrate_cwe` management command is **optional** and is *not* required on upgrade
55+
(it would repeat the work `0284` already did). It exists only as an idempotent re-scan you can run
56+
later — for example after a parser upgrade changes how a scan's CWEs are derived — to reconcile
57+
`Finding_CWE` rows from the current `Finding.cwe` values.
5758

5859
For more information, check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/3.2.0).

0 commit comments

Comments
 (0)