diff options
author | eliott <eliott@cactuswax.net> | 2008-03-08 09:25:02 +0100 |
---|---|---|
committer | eliott <eliott@cactuswax.net> | 2008-03-08 09:25:02 +0100 |
commit | e07a7675d0fb569530ba222fadfec2eaa084e0c1 (patch) | |
tree | d1dc1091bfbbb24139cd54f7b2951c7fb63fed1c | |
parent | 8019319a4fe5f52779f9f2531e3aa24aacbe43f5 (diff) | |
download | archweb-e07a7675d0fb569530ba222fadfec2eaa084e0c1.tar.gz archweb-e07a7675d0fb569530ba222fadfec2eaa084e0c1.tar.xz |
added packagedepends and arch models
-rw-r--r-- | main/models.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py index db63d59..c82eca6 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') |