Skip to content

Commit

Permalink
Add package_sets field to Package #95
Browse files Browse the repository at this point in the history
Signed-off-by: Jono Yang <jyang@nexb.com>
  • Loading branch information
JonoYang committed Jun 24, 2023
1 parent f6c7fbe commit fa4e62f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 4.1.2 on 2023-06-24 00:37

import django.contrib.postgres.fields
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("packagedb", "0067_alter_resource_md5_alter_resource_sha1_and_more"),
]

operations = [
migrations.AlterModelOptions(
name="resource",
options={},
),
migrations.AddField(
model_name="package",
name="package_sets",
field=django.contrib.postgres.fields.ArrayField(
base_field=models.UUIDField(blank=True, null=True),
blank=True,
default=list,
help_text="A list of package_set UUIDs that identifies which groups this Package is related to",
null=True,
size=None,
),
),
]
10 changes: 10 additions & 0 deletions packagedb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,16 @@ class Package(
blank=True,
help_text='A UUID used to identify a group of related Packages'
)
package_sets = ArrayField(
base_field=models.UUIDField(
blank=True,
null=True,
),
default=list,
blank=True,
null=True,
help_text=_('A list of package_set UUIDs that identifies which groups this Package is related to'),
)

package_content = models.IntegerField(
null=True,
Expand Down

0 comments on commit fa4e62f

Please sign in to comment.