From 40a40f508b9293f93d24050263c43506f1fe98db Mon Sep 17 00:00:00 2001
From: "Antoine R. Dumont (@ardumont)" <ardumont@softwareheritage.org>
Date: Mon, 22 Jun 2020 18:15:32 +0200
Subject: [PATCH] model.OriginVisit: Drop obsolete fields

Related to T2310
---
 swh/model/hypothesis_strategies.py | 3 ---
 swh/model/model.py                 | 8 +-------
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/swh/model/hypothesis_strategies.py b/swh/model/hypothesis_strategies.py
index e28d74e6..821343bb 100644
--- a/swh/model/hypothesis_strategies.py
+++ b/swh/model/hypothesis_strategies.py
@@ -158,9 +158,6 @@ def origin_visits_d():
         origin=urls(),
         date=aware_datetimes(),
         type=pgsql_text(),
-        status=none(),
-        snapshot=none(),
-        metadata=none(),
     )
 
 
diff --git a/swh/model/model.py b/swh/model/model.py
index bffe711d..f5850519 100644
--- a/swh/model/model.py
+++ b/swh/model/model.py
@@ -237,7 +237,7 @@ class Origin(BaseModel):
 
 @attr.s(frozen=True)
 class OriginVisit(BaseModel):
-    """Represents a visit of an origin at a given point in time, by a
+    """Represents an origin visit with a given type at a given point in time, by a
     SWH loader."""
 
     object_type: Final = "origin_visit"
@@ -248,12 +248,6 @@ class OriginVisit(BaseModel):
     """Should not be set before calling 'origin_visit_add()'."""
     visit = attr.ib(type=Optional[int], validator=type_validator(), default=None)
 
-    status = attr.ib(type=Optional[str], validator=type_validator(), default=None)
-    snapshot = attr.ib(type=Optional[Sha1Git], validator=type_validator(), default=None)
-    metadata = attr.ib(
-        type=Optional[Dict[str, object]], validator=type_validator(), default=None
-    )
-
     def to_dict(self):
         """Serializes the date as a string and omits the visit id if it is
         `None`."""
-- 
GitLab