Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/sql/30-schema.sql
Show All 33 Lines | |||||
-- relation filter options for querying | -- relation filter options for querying | ||||
create type rel_flt as enum ( | create type rel_flt as enum ( | ||||
'filter-src', | 'filter-src', | ||||
'filter-dst', | 'filter-dst', | ||||
'no-filter' | 'no-filter' | ||||
); | ); | ||||
comment on type rel_flt is 'Relation get filter types'; | comment on type rel_flt is 'Relation get filter types'; | ||||
-- a relation entry row, i.e. sr/dst Git object ID and optional UNIX path | |||||
create type rel_row as (src sha1_git, dst sha1_git, path unix_path); | |||||
-- entity tables | -- entity tables | ||||
create table content | create table content | ||||
( | ( | ||||
id bigserial primary key, -- internal identifier of the content blob | id bigserial primary key, -- internal identifier of the content blob | ||||
sha1 sha1_git unique not null, -- intrinsic identifier of the content blob | sha1 sha1_git unique not null, -- intrinsic identifier of the content blob | ||||
date timestamptz -- timestamp of the revision where the blob appears early | date timestamptz -- timestamp of the revision where the blob appears early | ||||
); | ); | ||||
comment on column content.id is 'Content internal identifier'; | comment on column content.id is 'Content internal identifier'; | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |