-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
- Loading branch information
Showing
55 changed files
with
1,315 additions
and
852 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
component_catalog/migrations/0008_remove_package_affected_by_vulnerabilities_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 5.0.6 on 2024-09-04 08:17 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('component_catalog', '0007_vulnerability_fixed_packages_count_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='package', | ||
name='affected_by_vulnerabilities', | ||
), | ||
migrations.RemoveField( | ||
model_name='component', | ||
name='affected_by_vulnerabilities', | ||
), | ||
migrations.DeleteModel( | ||
name='Vulnerability', | ||
), | ||
] |
53 changes: 53 additions & 0 deletions
53
component_catalog/migrations/0009_componentaffectedbyvulnerability_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Generated by Django 5.0.6 on 2024-09-04 09:22 | ||
|
||
import django.db.models.deletion | ||
import uuid | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('component_catalog', '0008_remove_package_affected_by_vulnerabilities_and_more'), | ||
('dje', '0004_dataspace_vulnerabilities_updated_at'), | ||
('vulnerabilities', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='ComponentAffectedByVulnerability', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, verbose_name='UUID')), | ||
('component', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='component_catalog.component')), | ||
('dataspace', models.ForeignKey(editable=False, help_text='A Dataspace is an independent, exclusive set of DejaCode data, which can be either nexB master reference data or installation-specific data.', on_delete=django.db.models.deletion.PROTECT, to='dje.dataspace')), | ||
('vulnerability', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vulnerabilities.vulnerability')), | ||
], | ||
options={ | ||
'unique_together': {('component', 'vulnerability'), ('dataspace', 'uuid')}, | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name='component', | ||
name='affected_by_vulnerabilities', | ||
field=models.ManyToManyField(help_text='Vulnerabilities affecting this object.', related_name='affected_%(class)ss', through='component_catalog.ComponentAffectedByVulnerability', to='vulnerabilities.vulnerability'), | ||
), | ||
migrations.CreateModel( | ||
name='PackageAffectedByVulnerability', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, verbose_name='UUID')), | ||
('dataspace', models.ForeignKey(editable=False, help_text='A Dataspace is an independent, exclusive set of DejaCode data, which can be either nexB master reference data or installation-specific data.', on_delete=django.db.models.deletion.PROTECT, to='dje.dataspace')), | ||
('package', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='component_catalog.package')), | ||
('vulnerability', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vulnerabilities.vulnerability')), | ||
], | ||
options={ | ||
'unique_together': {('dataspace', 'uuid'), ('package', 'vulnerability')}, | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name='package', | ||
name='affected_by_vulnerabilities', | ||
field=models.ManyToManyField(help_text='Vulnerabilities affecting this object.', related_name='affected_%(class)ss', through='component_catalog.PackageAffectedByVulnerability', to='vulnerabilities.vulnerability'), | ||
), | ||
] |
Oops, something went wrong.