Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/sql/30-schema.sql
Show First 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | |||||
-- Crawling history of software origin visits by Software Heritage. Each | -- Crawling history of software origin visits by Software Heritage. Each | ||||
-- visit see its history change through new origin visit status updates | -- visit see its history change through new origin visit status updates | ||||
create table origin_visit_status | create table origin_visit_status | ||||
( | ( | ||||
origin bigint not null, | origin bigint not null, | ||||
visit bigint not null, | visit bigint not null, | ||||
date timestamptz not null, | date timestamptz not null, | ||||
type text, | |||||
status origin_visit_state not null, | status origin_visit_state not null, | ||||
metadata jsonb, | metadata jsonb, | ||||
snapshot sha1_git | snapshot sha1_git | ||||
); | ); | ||||
comment on column origin_visit_status.origin is 'Origin concerned by the visit update'; | comment on column origin_visit_status.origin is 'Origin concerned by the visit update'; | ||||
comment on column origin_visit_status.visit is 'Visit concerned by the visit update'; | comment on column origin_visit_status.visit is 'Visit concerned by the visit update'; | ||||
comment on column origin_visit_status.date is 'Visit update timestamp'; | comment on column origin_visit_status.date is 'Visit update timestamp'; | ||||
comment on column origin_visit_status.type is 'Type of loader that did the visit (hg, git, ...)'; | |||||
comment on column origin_visit_status.status is 'Visit status (ongoing, failed, full)'; | comment on column origin_visit_status.status is 'Visit status (ongoing, failed, full)'; | ||||
comment on column origin_visit_status.metadata is 'Optional origin visit metadata'; | comment on column origin_visit_status.metadata is 'Optional origin visit metadata'; | ||||
comment on column origin_visit_status.snapshot is 'Optional, possibly partial, snapshot of the origin visit. It can be partial.'; | comment on column origin_visit_status.snapshot is 'Optional, possibly partial, snapshot of the origin visit. It can be partial.'; | ||||
-- A snapshot represents the entire state of a software origin as crawled by | -- A snapshot represents the entire state of a software origin as crawled by | ||||
-- Software Heritage. This table is a simple mapping between (public) intrinsic | -- Software Heritage. This table is a simple mapping between (public) intrinsic | ||||
-- snapshot identifiers and (private) numeric sequential identifiers. | -- snapshot identifiers and (private) numeric sequential identifiers. | ||||
▲ Show 20 Lines • Show All 180 Lines • Show Last 20 Lines |