Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/sql/30-swh-schema.sql
Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | |||||
-- Crawling history of software origins visited by Software Heritage. Each | -- Crawling history of software origins visited by Software Heritage. Each | ||||
-- visit is a 3-way mapping between a software origin, a timestamp, and a | -- visit is a 3-way mapping between a software origin, a timestamp, and a | ||||
-- snapshot object capturing the full-state of the origin at visit time. | -- snapshot object capturing the full-state of the origin at visit time. | ||||
create table origin_visit | create table origin_visit | ||||
( | ( | ||||
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 not null, | |||||
status origin_visit_status not null, | status origin_visit_status not null, | ||||
metadata jsonb, | metadata jsonb, | ||||
snapshot sha1_git | snapshot sha1_git | ||||
); | ); | ||||
comment on column origin_visit.origin is 'Visited origin'; | comment on column origin_visit.origin is 'Visited origin'; | ||||
comment on column origin_visit.visit is 'Sequential visit number for the origin'; | comment on column origin_visit.visit is 'Sequential visit number for the origin'; | ||||
comment on column origin_visit.date is 'Visit timestamp'; | comment on column origin_visit.date is 'Visit timestamp'; | ||||
ardumont: loader | |||||
comment on column origin_visit.type is 'Type of loaded that did the visit (hg, git, ...)'; | |||||
comment on column origin_visit.status is 'Visit result'; | comment on column origin_visit.status is 'Visit result'; | ||||
comment on column origin_visit.metadata is 'Origin metadata at visit time'; | comment on column origin_visit.metadata is 'Origin metadata at visit time'; | ||||
comment on column origin_visit.snapshot is 'Origin snapshot at visit time'; | comment on column origin_visit.snapshot is 'Origin snapshot at visit time'; | ||||
-- 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 119 Lines • Show Last 20 Lines |
loader