Skip to content

Commit

Permalink
Delete qualifiers_temp field and unique_togther step 7
Browse files Browse the repository at this point in the history
Reference: aboutcode-org#1327
Signed-off-by: Tushar Goel <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
  • Loading branch information
TG1999 committed Dec 26, 2023
1 parent 329629e commit d269276
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 4.1.7 on 2023-12-05 13:52

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("vulnerabilities", "0051_alter_package_unique_together"),
]

operations = [
migrations.AlterUniqueTogether(
name="package",
unique_together={("type", "namespace", "name", "version", "qualifiers", "subpath")},
),
migrations.RemoveField(
model_name="package",
name="qualifiers_temp",
),
]
12 changes: 5 additions & 7 deletions vulnerabilities/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,11 +579,11 @@ class Package(PackageURLMixin):
"""
- X schema migration: create qualifiers_temp
- X data migration copy as string the normalized qualifiers to qualifiers_temp
- schema migration: add qualifiers_temp to unique together
- schema migration: remove qualifiers override and from unique together
- data migration copy as string the normalized qualifiers_temp to qualifiers
- schema migration: add qualifiers to unique together
- schema migration: delete qualifiers_temp
- X schema migration: add qualifiers_temp to unique together
- X schema migration: remove qualifiers override and from unique together
- X data migration copy as string the normalized qualifiers_temp to qualifiers
- X schema migration: add qualifiers to unique together
- X schema migration: delete qualifiers_temp
"""

"""
Expand All @@ -601,8 +601,6 @@ class Package(PackageURLMixin):
# https://github.com/package-url/packageurl-python/pull/67
# gets merged

qualifiers_temp = models.CharField(max_length=1024, blank=True)

vulnerabilities = models.ManyToManyField(
to="Vulnerability", through="PackageRelatedVulnerability"
)
Expand Down

0 comments on commit d269276

Please sign in to comment.