Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/sql/30-schema.sql
Show All 11 Lines | |||||
comment on table dbversion is 'Details of current db version'; | comment on table dbversion is 'Details of current db version'; | ||||
comment on column dbversion.version is 'SQL schema version'; | comment on column dbversion.version is 'SQL schema version'; | ||||
comment on column dbversion.release is 'Version deployment timestamp'; | comment on column dbversion.release is 'Version deployment timestamp'; | ||||
comment on column dbversion.description is 'Release description'; | comment on column dbversion.description is 'Release description'; | ||||
-- latest schema version | -- latest schema version | ||||
insert into dbversion(version, release, description) | insert into dbversion(version, release, description) | ||||
values(167, now(), 'Work In Progress'); | values(169, now(), 'Work In Progress'); | ||||
-- a SHA1 checksum | -- a SHA1 checksum | ||||
create domain sha1 as bytea check (length(value) = 20); | create domain sha1 as bytea check (length(value) = 20); | ||||
-- a Git object ID, i.e., a Git-style salted SHA1 checksum | -- a Git object ID, i.e., a Git-style salted SHA1 checksum | ||||
create domain sha1_git as bytea check (length(value) = 20); | create domain sha1_git as bytea check (length(value) = 20); | ||||
-- a SHA256 checksum | -- a SHA256 checksum | ||||
▲ Show 20 Lines • Show All 396 Lines • ▼ Show 20 Lines | |||||
comment on column metadata_authority.type is 'Type of authority (deposit_client/forge/registry)'; | comment on column metadata_authority.type is 'Type of authority (deposit_client/forge/registry)'; | ||||
comment on column metadata_authority.url is 'Authority''s uri'; | comment on column metadata_authority.url is 'Authority''s uri'; | ||||
comment on column metadata_authority.metadata is 'Other metadata about authority'; | comment on column metadata_authority.metadata is 'Other metadata about authority'; | ||||
-- Extrinsic metadata on a DAG objects and origins. | -- Extrinsic metadata on a DAG objects and origins. | ||||
create table raw_extrinsic_metadata | create table raw_extrinsic_metadata | ||||
( | ( | ||||
id sha1_git not null, | |||||
type text not null, | type text not null, | ||||
target text not null, | target text not null, | ||||
-- metadata source | -- metadata source | ||||
authority_id bigint not null, | authority_id bigint not null, | ||||
fetcher_id bigint not null, | fetcher_id bigint not null, | ||||
discovery_date timestamptz not null, | discovery_date timestamptz not null, | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |