summaryrefslogtreecommitdiff
path: root/main/models.py
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2008-03-08 00:25:02 -0800
committereliott <eliott@cactuswax.net>2008-03-08 00:25:02 -0800
commite07a7675d0fb569530ba222fadfec2eaa084e0c1 (patch)
treed1dc1091bfbbb24139cd54f7b2951c7fb63fed1c /main/models.py
parent8019319a4fe5f52779f9f2531e3aa24aacbe43f5 (diff)
added packagedepends and arch models
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py
index db63d59f..c82eca6a 100644
--- a/main/models.py
+++ b/main/models.py
@@ -102,6 +102,13 @@ class News(models.Model):
def get_absolute_url(self):
return '/news/%i/' % self.id
+class Arch(models.Model):
+ id = models.AutoField(primary_key=True)
+ name = models.CharField(maxlength=255)
+ class Meta:
+ db_table = 'arch'
+ ordering = ['name']
+
class Repo(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(maxlength=255)
@@ -119,6 +126,7 @@ class Repo(models.Model):
class Package(models.Model):
id = models.AutoField(primary_key=True)
repo = models.ForeignKey(Repo)
+ arch = models.ForeignKey(Arch)
maintainer = models.ForeignKey(User, related_name='package_maintainer')
needupdate = models.BooleanField(default=False)
pkgname = models.CharField(maxlength=255)
@@ -169,6 +177,14 @@ class PackageFile(models.Model):
class Meta:
db_table = 'packages_files'
+class PackageDepends(models.Model):
+ id = models.AutoField(primary_key=True)
+ pkg = models.ForeignKey(Package)
+ depname = models.CharField(db_index=True, maxlength=255)
+ depvcmp = models.CharField(maxlength=255)
+ class Meta:
+ db_table = 'packages_depends'
+
class Todolist(models.Model):
id = models.AutoField(primary_key=True)
creator = models.ForeignKey(User, related_name='todolist_creator')