From e07a7675d0fb569530ba222fadfec2eaa084e0c1 Mon Sep 17 00:00:00 2001 From: eliott Date: Sat, 8 Mar 2008 00:25:02 -0800 Subject: added packagedepends and arch models --- main/models.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 Meta: 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 @@ def last_update(self): 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') -- cgit v1.2.3-54-g00ecf