Skip to content

Commit a44ff49

Browse files
committed
adding ProjectAssociation table to hold a project and its parent_project
1 parent ae4f1a9 commit a44ff49

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ingest/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class ProjectConsortium(models.Model):
2626
project = models.ForeignKey(Project, on_delete=models.SET_NULL, blank=False, null=True)
2727
consortium = models.ForeignKey(Consortium, on_delete=models.SET_NULL, null = True, blank=True)
2828

29+
class ProjectAssociation(models.Model):
30+
project = models.ForeignKey(Project, related_name='project', on_delete=models.SET_NULL, blank=False, null=True)
31+
parent_project = models.ForeignKey(Project, related_name='parent_project', on_delete=models.SET_NULL, blank=False, null=True)
32+
2933
class People(models.Model):
3034
def __str__(self):
3135
return self.name

0 commit comments

Comments
 (0)