From 971c2532391f5a621b77aafbff752ab3fd2d7c2c Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Thu, 13 Oct 2016 16:36:25 +0200 Subject: [PATCH] models: add task_id and origin_id columns to the repos table --- swh/lister/github/models.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/swh/lister/github/models.py b/swh/lister/github/models.py index c4cb027..e35ca78 100644 --- a/swh/lister/github/models.py +++ b/swh/lister/github/models.py @@ -28,8 +28,11 @@ class Repository(SQLBase): last_seen = Column(DateTime, nullable=False) + task_id = Column(Integer) + origin_id = Column(Integer) + def __init__(self, id, name=None, full_name=None, html_url=None, - description=None, fork=None): + description=None, fork=None, task_id=None, origin_id=None): self.id = id self.last_seen = datetime.now() if name is not None: @@ -42,3 +45,7 @@ class Repository(SQLBase): self.description = description if fork is not None: self.fork = fork + if task_id is not None: + self.task_id = task_id + if origin_id is not None: + self.origin_id = origin_id