Skip to content

Commit 7bd952b

Browse files
Maffoochclaude
andcommitted
chore(migrations): rebase onto dev, renumber vuln-id chain 0280-0282
Resolves the migration-graph leaf collision: dev has advanced to 0279_jira_project_transition_fields, so the vulnerability-id migrations are renumbered 0276/0277/0278 -> 0280/0281/0282 and the first is re-parented onto the current dev leaf. Also merges a duplicate `class Meta` on Vulnerability_Id introduced by the rebase: dev's global-search FTS work added its own Meta (GIN indexes) adjacent to this branch's Meta (unique constraint + dojo_vuln_id_lookup_idx). Python keeps only the last class body, which silently dropped the constraint/index from the model state (makemigrations wanted to remove them). Both are now in a single Meta. `makemigrations --check dojo` reports no changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 9bfc787 commit 7bd952b

4 files changed

Lines changed: 3 additions & 7 deletions

File tree

dojo/db_migrations/0276_vulnerability_id_type.py renamed to dojo/db_migrations/0280_vulnerability_id_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Migration(migrations.Migration):
99
mixed with schema migrations."""
1010

1111
dependencies = [
12-
("dojo", "0275_usercontactinfo_user_state_details"),
12+
("dojo", "0279_jira_project_transition_fields"),
1313
]
1414

1515
operations = [

dojo/db_migrations/0277_backfill_vulnerability_id_type.py renamed to dojo/db_migrations/0281_backfill_vulnerability_id_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Migration(migrations.Migration):
4040
vulnerability_id_type for existing rows."""
4141

4242
dependencies = [
43-
("dojo", "0276_vulnerability_id_type"),
43+
("dojo", "0280_vulnerability_id_type"),
4444
]
4545

4646
operations = [

dojo/db_migrations/0278_unique_finding_vulnerability_id.py renamed to dojo/db_migrations/0282_unique_finding_vulnerability_id.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Migration(migrations.Migration):
77
dedupe data step so the constraint can be created without violating existing duplicate rows."""
88

99
dependencies = [
10-
("dojo", "0277_backfill_vulnerability_id_type"),
10+
("dojo", "0281_backfill_vulnerability_id_type"),
1111
]
1212

1313
operations = [

dojo/finding/models.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,10 +1393,6 @@ class Meta:
13931393
# Leading on vulnerability_id (the unique constraint's index leads on finding), for
13941394
# GROUP BY vulnerability_id / lookups by exact id.
13951395
models.Index(fields=["vulnerability_id"], name="dojo_vuln_id_lookup_idx"),
1396-
]
1397-
1398-
class Meta:
1399-
indexes = [
14001396
# Global search (pro/search/): weighted tsvector FTS + trigram fuzzy match.
14011397
GinIndex(
14021398
SearchVector("vulnerability_id", weight="A", config="english"),

0 commit comments

Comments
 (0)