Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/sql/30-swh-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(157, now(), 'Work In Progress'); | values(158, now(), 'Work In Progress'); | ||||
anlambert: You need to upgrade dbversion here. | |||||
Done Inline Actionsjeez, thx douardda: jeez, thx | |||||
Not Done Inline Actions"given enough eyeballs..." ardumont: "given enough eyeballs..." | |||||
-- 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 205 Lines • ▼ Show 20 Lines | ( | ||||
directory sha1_git, -- source code 'root' directory | directory sha1_git, -- source code 'root' directory | ||||
message bytea, | message bytea, | ||||
author bigint, | author bigint, | ||||
committer bigint, | committer bigint, | ||||
synthetic boolean not null default false, -- true iff revision has been created by Software Heritage | synthetic boolean not null default false, -- true iff revision has been created by Software Heritage | ||||
metadata jsonb, -- extra metadata (tarball checksums, extra commit information, etc...) | metadata jsonb, -- extra metadata (tarball checksums, extra commit information, etc...) | ||||
object_id bigserial, | object_id bigserial, | ||||
date_neg_utc_offset boolean, | date_neg_utc_offset boolean, | ||||
committer_date_neg_utc_offset boolean | committer_date_neg_utc_offset boolean, | ||||
extra_headers bytea[][] -- extra headers (used in hash computation) | |||||
); | ); | ||||
comment on table revision is 'A revision represents the state of a source code tree at a specific point in time'; | comment on table revision is 'A revision represents the state of a source code tree at a specific point in time'; | ||||
comment on column revision.id is 'Git-style SHA1 commit identifier'; | comment on column revision.id is 'Git-style SHA1 commit identifier'; | ||||
comment on column revision.date is 'Author timestamp as UNIX epoch'; | comment on column revision.date is 'Author timestamp as UNIX epoch'; | ||||
comment on column revision.date_offset is 'Author timestamp timezone, as minute offsets from UTC'; | comment on column revision.date_offset is 'Author timestamp timezone, as minute offsets from UTC'; | ||||
comment on column revision.date_neg_utc_offset is 'True indicates a -0 UTC offset on author timestamp'; | comment on column revision.date_neg_utc_offset is 'True indicates a -0 UTC offset on author timestamp'; | ||||
comment on column revision.committer_date is 'Committer timestamp as UNIX epoch'; | comment on column revision.committer_date is 'Committer timestamp as UNIX epoch'; | ||||
comment on column revision.committer_date_offset is 'Committer timestamp timezone, as minute offsets from UTC'; | comment on column revision.committer_date_offset is 'Committer timestamp timezone, as minute offsets from UTC'; | ||||
comment on column revision.committer_date_neg_utc_offset is 'True indicates a -0 UTC offset on committer timestamp'; | comment on column revision.committer_date_neg_utc_offset is 'True indicates a -0 UTC offset on committer timestamp'; | ||||
comment on column revision.type is 'Type of revision'; | comment on column revision.type is 'Type of revision'; | ||||
comment on column revision.directory is 'Directory identifier'; | comment on column revision.directory is 'Directory identifier'; | ||||
comment on column revision.message is 'Commit message'; | comment on column revision.message is 'Commit message'; | ||||
comment on column revision.author is 'Author identity'; | comment on column revision.author is 'Author identity'; | ||||
comment on column revision.committer is 'Committer identity'; | comment on column revision.committer is 'Committer identity'; | ||||
comment on column revision.synthetic is 'True iff revision has been synthesized by Software Heritage'; | comment on column revision.synthetic is 'True iff revision has been synthesized by Software Heritage'; | ||||
comment on column revision.metadata is 'Extra revision metadata'; | comment on column revision.metadata is 'Extra revision metadata'; | ||||
comment on column revision.object_id is 'Non-intrinsic, sequential object identifier'; | comment on column revision.object_id is 'Non-intrinsic, sequential object identifier'; | ||||
comment on column revision.extra_headers is 'Extra revision headers; used in revision hash computation'; | |||||
-- either this table or the sha1_git[] column on the revision table | -- either this table or the sha1_git[] column on the revision table | ||||
create table revision_history | create table revision_history | ||||
( | ( | ||||
id sha1_git not null, | id sha1_git not null, | ||||
parent_id sha1_git not null, | parent_id sha1_git not null, | ||||
parent_rank int not null default 0 | parent_rank int not null default 0 | ||||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |
You need to upgrade dbversion here.