1- # Generated by Django 4.2.16 on 2024-12-23 19:32
1+ # Generated by Django 4.2.16 on 2025-01-08 13:28
22
33from django .db import migrations , models
44import django .db .models .deletion
@@ -25,7 +25,7 @@ class Migration(migrations.Migration):
2525 models .JSONField (
2626 blank = True ,
2727 default = list ,
28- help_text = "List of commit identifiers associated with the code change." ,
28+ help_text = "List of commit identifiers using VCS URLs associated with the code change." ,
2929 ),
3030 ),
3131 (
@@ -48,15 +48,15 @@ class Migration(migrations.Migration):
4848 "patch" ,
4949 models .TextField (
5050 blank = True ,
51- help_text = "The code change in patch format (e.g., git diff) ." ,
51+ help_text = "The code change as a patch in unified diff format ." ,
5252 null = True ,
5353 ),
5454 ),
5555 (
5656 "notes" ,
5757 models .TextField (
5858 blank = True ,
59- help_text = "Additional notes or instructions about the code change." ,
59+ help_text = "Notes or instructions about this code change." ,
6060 null = True ,
6161 ),
6262 ),
@@ -65,55 +65,58 @@ class Migration(migrations.Migration):
6565 models .JSONField (
6666 blank = True ,
6767 default = list ,
68- help_text = "External references related to this code change." ,
68+ help_text = "URL references related to this code change." ,
6969 ),
7070 ),
7171 (
72- "status_reviewed " ,
72+ "is_reviewed " ,
7373 models .BooleanField (
74- default = False , help_text = "Indicates if the code change has been reviewed."
75- ),
76- ),
77- (
78- "base_commit" ,
79- models .CharField (
80- blank = True ,
81- help_text = "The commit ID representing the state of the code before applying the fix or change." ,
82- max_length = 255 ,
83- null = True ,
74+ default = False , help_text = "Indicates if this code change has been reviewed."
8475 ),
8576 ),
8677 (
8778 "created_at" ,
8879 models .DateTimeField (
8980 auto_now_add = True ,
90- help_text = "Timestamp indicating when the code change was created." ,
81+ help_text = "Timestamp indicating when this code change was created." ,
9182 ),
9283 ),
9384 (
9485 "updated_at" ,
9586 models .DateTimeField (
9687 auto_now = True ,
97- help_text = "Timestamp indicating when the code change was last updated." ,
88+ help_text = "Timestamp indicating when this code change was last updated." ,
9889 ),
9990 ),
10091 (
101- "base_version" ,
92+ "affected_package_vulnerability" ,
93+ models .ForeignKey (
94+ help_text = "The affected package version to which this code fix applies." ,
95+ on_delete = django .db .models .deletion .CASCADE ,
96+ related_name = "code_fix" ,
97+ to = "vulnerabilities.affectedbypackagerelatedvulnerability" ,
98+ ),
99+ ),
100+ (
101+ "base_package_version" ,
102102 models .ForeignKey (
103103 blank = True ,
104- help_text = "The base version of the package to which this code change applies." ,
104+ help_text = "The base package version to which this code change applies." ,
105105 null = True ,
106106 on_delete = django .db .models .deletion .SET_NULL ,
107- related_name = "base_version_codechanges " ,
107+ related_name = "codechanges " ,
108108 to = "vulnerabilities.package" ,
109109 ),
110110 ),
111111 (
112- "package_vulnerabilities" ,
113- models .ManyToManyField (
114- help_text = "The vulnerabilities fixed by this code change." ,
115- related_name = "code_fixes" ,
116- to = "vulnerabilities.affectedbypackagerelatedvulnerability" ,
112+ "fixed_package_vulnerability" ,
113+ models .ForeignKey (
114+ blank = True ,
115+ help_text = "The fixing package version with this code fix" ,
116+ null = True ,
117+ on_delete = django .db .models .deletion .SET_NULL ,
118+ related_name = "code_fix" ,
119+ to = "vulnerabilities.fixingpackagerelatedvulnerability" ,
117120 ),
118121 ),
119122 ],
0 commit comments