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 @@ -123,6 +123,7 @@ visit_status["date"], visit_status["status"], hash_to_hex_or_none(visit_status["snapshot"]), + visit_status["type"], ) ) @@ -176,6 +177,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_date_microseconds", "int"), ("committer_date_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 @@ -66,6 +66,7 @@ obj.date, obj.status, hash_to_hex_or_none(obj.snapshot), + obj.type, ) in output[obj_type] @@ -114,6 +115,7 @@ obj.committer_date.to_dict() if obj.committer_date else None ), hash_to_hex_or_none(obj.directory), + obj.type.value, ) in output["revision"] for i, parent in enumerate(obj.parents): assert (