diff --git a/sql/upgrades/152.sql b/sql/upgrades/152.sql new file mode 100644 --- /dev/null +++ b/sql/upgrades/152.sql @@ -0,0 +1,11 @@ +-- SWH DB schema upgrade +-- from_version: 151 +-- to_version: 152 +-- description: Make content.blake2s256 not null + +-- latest schema version +insert into dbversion(version, release, description) + values(152, now(), 'Work In Progress'); + +alter table content + alter column blake2s256 not null; diff --git a/swh/storage/sql/30-swh-schema.sql b/swh/storage/sql/30-swh-schema.sql --- a/swh/storage/sql/30-swh-schema.sql +++ b/swh/storage/sql/30-swh-schema.sql @@ -17,7 +17,7 @@ -- latest schema version insert into dbversion(version, release, description) - values(151, now(), 'Work In Progress'); + values(152, now(), 'Work In Progress'); -- a SHA1 checksum create domain sha1 as bytea check (length(value) = 20); @@ -47,7 +47,7 @@ sha1 sha1 not null, sha1_git sha1_git not null, sha256 sha256 not null, - blake2s256 blake2s256, + blake2s256 blake2s256 not null, length bigint not null, ctime timestamptz not null default now(), -- creation time, i.e. time of (first) injection into the storage