summaryrefslogtreecommitdiff
path: root/main/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-08-17 09:43:40 -0500
committerDan McGee <dan@archlinux.org>2010-08-17 09:43:40 -0500
commited71d525e347f77997ea07f22a37a68a0531357f (patch)
tree68ecc2dcf125e2d56d68d6b8a46f57dfa10b7b21 /main/models.py
parent9300b43b792565805b655bcddf2cbf7982a11dfe (diff)
Make package size fields big integers
We had a package go in today that has an installed size > 2GB, which makes PostgreSQL blow up when trying to create the package entry. Enlarge these fields to big integers so they can store all conceivable package size values. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/models.py b/main/models.py
index 68f378d9..792c0392 100644
--- a/main/models.py
+++ b/main/models.py
@@ -169,8 +169,9 @@ class Package(models.Model):
pkgdesc = models.CharField(max_length=255, null=True)
url = models.CharField(max_length=255, null=True)
filename = models.CharField(max_length=255)
- compressed_size = models.PositiveIntegerField(null=True)
- installed_size = models.PositiveIntegerField(null=True)
+ # TODO: it would be nice to have the >0 check constraint back here
+ compressed_size = models.BigIntegerField(null=True)
+ installed_size = models.BigIntegerField(null=True)
build_date = models.DateTimeField(null=True)
last_update = models.DateTimeField(null=True, blank=True)
files_last_update = models.DateTimeField(null=True, blank=True)