Skip to content

Commit

Permalink
Merge pull request pulp#201 from daviddavis/issue4998
Browse files Browse the repository at this point in the history
Increasing artifact size field to hold more than 2GB
  • Loading branch information
daviddavis committed Jul 5, 2019
2 parents 78e2c69 + 238f9d1 commit 3c84718
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/4998.bugfix
@@ -0,0 +1 @@
Increased artifact size field to prevent 500 errors for artifacts > 2GB in size.
18 changes: 18 additions & 0 deletions pulpcore/app/migrations/0002_increase_artifact_size_field.py
@@ -0,0 +1,18 @@
# Generated by Django 2.2.2 on 2019-07-05 17:06

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='artifact',
name='size',
field=models.BigIntegerField(),
),
]
2 changes: 1 addition & 1 deletion pulpcore/app/models/content.py
Expand Up @@ -103,7 +103,7 @@ def storage_path(self, name):
return storage.get_artifact_path(self.sha256)

file = fields.ArtifactFileField(null=False, upload_to=storage_path, max_length=255)
size = models.IntegerField(null=False)
size = models.BigIntegerField(null=False)
md5 = models.CharField(max_length=32, null=False, unique=False, db_index=True)
sha1 = models.CharField(max_length=40, null=False, unique=False, db_index=True)
sha224 = models.CharField(max_length=56, null=False, unique=False, db_index=True)
Expand Down

0 comments on commit 3c84718

Please sign in to comment.