Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/sql/30-schema.sql
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | ( | ||||
path unix_path unique not null -- path to the location | path unix_path unique not null -- path to the location | ||||
); | ); | ||||
comment on column location.id is 'Location internal identifier'; | comment on column location.id is 'Location internal identifier'; | ||||
comment on column location.path is 'Path to the location'; | comment on column location.path is 'Path to the location'; | ||||
create table origin | create table origin | ||||
( | ( | ||||
id bigserial primary key, -- internal identifier of the origin | id bigserial primary key, -- internal identifier of the origin | ||||
sha1 sha1_git unique not null, -- intrinsic identifier of the origin | |||||
url unix_path unique not null -- url of the origin | url unix_path unique not null -- url of the origin | ||||
); | ); | ||||
comment on column origin.id is 'Origin internal identifier'; | comment on column origin.id is 'Origin internal identifier'; | ||||
comment on column origin.sha1 is 'Origin intrinsic identifier'; | |||||
comment on column origin.url is 'URL of the origin'; | comment on column origin.url is 'URL of the origin'; | ||||
-- relation tables | -- relation tables | ||||
create table content_in_revision | create table content_in_revision | ||||
( | ( | ||||
content bigint not null, -- internal identifier of the content blob | content bigint not null, -- internal identifier of the content blob | ||||
revision bigint not null, -- internal identifier of the revision where the blob appears for the first time | revision bigint not null, -- internal identifier of the revision where the blob appears for the first time | ||||
location bigint -- location of the content relative to the revision root directory | location bigint -- location of the content relative to the revision root directory | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |