diff --git a/sql/upgrades/179.sql b/sql/upgrades/179.sql new file mode 100644 --- /dev/null +++ b/sql/upgrades/179.sql @@ -0,0 +1,9 @@ +-- SWH DB schema upgrade +-- from_version: 178 +-- to_version: 179 +-- description: add bzr to revision_type values + +insert into dbversion(version, release, description) + values(179, now(), 'Work In Progress'); + +alter table release drop constraint release_author_date_check; diff --git a/swh/storage/postgresql/db.py b/swh/storage/postgresql/db.py --- a/swh/storage/postgresql/db.py +++ b/swh/storage/postgresql/db.py @@ -30,7 +30,7 @@ """ - current_version = 178 + current_version = 179 def mktemp_dir_entry(self, entry_type, cur=None): self._cursor(cur).execute( diff --git a/swh/storage/sql/30-schema.sql b/swh/storage/sql/30-schema.sql --- a/swh/storage/sql/30-schema.sql +++ b/swh/storage/sql/30-schema.sql @@ -17,7 +17,7 @@ -- latest schema version insert into dbversion(version, release, description) - values(178, now(), 'Work In Progress'); + values(179, now(), 'Work In Progress'); -- a SHA1 checksum create domain sha1 as bytea check (length(value) = 20); diff --git a/swh/storage/sql/60-indexes.sql b/swh/storage/sql/60-indexes.sql --- a/swh/storage/sql/60-indexes.sql +++ b/swh/storage/sql/60-indexes.sql @@ -236,10 +236,6 @@ alter table release validate constraint release_date_neg_utc_offset_not_null; - - -- if the author is null, then the date must be null - alter table release add constraint release_author_date_check check ((date is null) or (author is not null)) not valid; - alter table release validate constraint release_author_date_check; \endif -- metadata_fetcher