Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/postgresql_nopath/provenance.sql
Show All 32 Lines | |||||
comment on column content_early_in_rev.blob is 'Content internal identifier'; | comment on column content_early_in_rev.blob is 'Content internal identifier'; | ||||
comment on column content_early_in_rev.rev is 'Revision internal identifier'; | comment on column content_early_in_rev.rev is 'Revision internal identifier'; | ||||
drop table if exists content_in_dir; | drop table if exists content_in_dir; | ||||
create table content_in_dir | create table content_in_dir | ||||
( | ( | ||||
blob bigint not null, -- internal identifier of the content blob | blob bigint not null, -- internal identifier of the content blob | ||||
dir bigint not null, -- internal identifier of the directory contaning the blob | dir bigint not null, -- internal identifier of the directory containing the blob | ||||
primary key (blob, dir) | primary key (blob, dir) | ||||
-- foreign key (blob) references content (id), | -- foreign key (blob) references content (id), | ||||
-- foreign key (dir) references directory (id) | -- foreign key (dir) references directory (id) | ||||
); | ); | ||||
comment on column content_in_dir.blob is 'Content internal identifier'; | comment on column content_in_dir.blob is 'Content internal identifier'; | ||||
comment on column content_in_dir.dir is 'Directory internal identifier'; | comment on column content_in_dir.dir is 'Directory internal identifier'; | ||||
Show All 37 Lines | |||||
drop table if exists revision; | drop table if exists revision; | ||||
create table revision | create table revision | ||||
( | ( | ||||
id bigserial primary key, -- internal identifier of the revision | id bigserial primary key, -- internal identifier of the revision | ||||
sha1 sha1_git unique not null, -- intrinsic identifier of the revision | sha1 sha1_git unique not null, -- intrinsic identifier of the revision | ||||
date timestamptz not null, -- timestamp of the revision | date timestamptz not null, -- timestamp of the revision | ||||
org bigint -- id of the prefered origin | org bigint -- id of the preferred origin | ||||
-- foreign key (org) references origin (id) | -- foreign key (org) references origin (id) | ||||
); | ); | ||||
comment on column revision.id is 'Revision internal identifier'; | comment on column revision.id is 'Revision internal identifier'; | ||||
comment on column revision.sha1 is 'Revision intrinsic identifier'; | comment on column revision.sha1 is 'Revision intrinsic identifier'; | ||||
comment on column revision.date is 'Revision timestamp'; | comment on column revision.date is 'Revision timestamp'; | ||||
comment on column revision.org is 'Prefered origin for the revision'; | comment on column revision.org is 'Prefered origin for the revision'; | ||||
Show All 27 Lines |