diff --git a/CHANGES/4998.bugfix b/CHANGES/4998.bugfix new file mode 100644 index 0000000000..20f13adc6c --- /dev/null +++ b/CHANGES/4998.bugfix @@ -0,0 +1 @@ +Increased artifact size field to prevent 500 errors for artifacts > 2GB in size. diff --git a/pulpcore/app/migrations/0002_increase_artifact_size_field.py b/pulpcore/app/migrations/0002_increase_artifact_size_field.py new file mode 100644 index 0000000000..e7adcd0bf8 --- /dev/null +++ b/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(), + ), + ] diff --git a/pulpcore/app/models/content.py b/pulpcore/app/models/content.py index 805f86528a..5b6d08fe33 100644 --- a/pulpcore/app/models/content.py +++ b/pulpcore/app/models/content.py @@ -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)