diff --git a/swh/dataset/exporters/orc.py b/swh/dataset/exporters/orc.py --- a/swh/dataset/exporters/orc.py +++ b/swh/dataset/exporters/orc.py @@ -171,6 +171,7 @@ datetime_to_tuple(visit_status["date"]), visit_status["status"], hash_to_hex_or_none(visit_status["snapshot"]), + visit_status["type"], ) ) @@ -224,6 +225,7 @@ revision["committer"]["fullname"], *swh_date_to_tuple(revision["committer_date"]), hash_to_hex_or_none(revision["directory"]), + revision["type"], ) ) diff --git a/swh/dataset/relational.py b/swh/dataset/relational.py --- a/swh/dataset/relational.py +++ b/swh/dataset/relational.py @@ -20,6 +20,7 @@ ("date", "timestamp"), ("status", "string"), ("snapshot", "string"), + ("type", "string"), ], "snapshot": [ ("id", "string"), @@ -53,6 +54,7 @@ ("committer_offset", "smallint"), ("committer_date_raw_offset_bytes", "binary"), ("directory", "string"), + ("type", "string"), ], "revision_history": [ ("id", "string"), diff --git a/swh/dataset/test/test_orc.py b/swh/dataset/test/test_orc.py --- a/swh/dataset/test/test_orc.py +++ b/swh/dataset/test/test_orc.py @@ -73,6 +73,7 @@ datetime_to_tuple(obj.date), obj.status, hash_to_hex_or_none(obj.snapshot), + obj.type, ) in output[obj_type] @@ -121,6 +122,7 @@ obj.committer_date.to_dict() if obj.committer_date is not None else None ), hash_to_hex_or_none(obj.directory), + obj.type.value, ) in output["revision"] for i, parent in enumerate(obj.parents): assert (