Skip to content

Commit

Permalink
Add info field to RepositoryVersion
Browse files Browse the repository at this point in the history
closes #2998
  • Loading branch information
hstct authored and ipanova committed Aug 10, 2022
1 parent e438f30 commit 7eab840
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/plugin_api/2998.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added new field ``info`` to the ``RepositoryVersion``. This will allow to store additional information for a specific version.
18 changes: 18 additions & 0 deletions pulpcore/app/migrations/0093_add_info_field_repositoryversion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.13 on 2022-08-02 15:11

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0092_alter_upload_options'),
]

operations = [
migrations.AddField(
model_name='repositoryversion',
name='info',
field=models.JSONField(default=dict),
),
]
1 change: 1 addition & 0 deletions pulpcore/app/models/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ class RepositoryVersion(BaseModel):
number = models.PositiveIntegerField(db_index=True)
complete = models.BooleanField(db_index=True, default=False)
base_version = models.ForeignKey("RepositoryVersion", null=True, on_delete=models.SET_NULL)
info = models.JSONField(default=dict)

class Meta:
default_related_name = "versions"
Expand Down

0 comments on commit 7eab840

Please sign in to comment.