Changeset View
Changeset View
Standalone View
Standalone View
sql/upgrades/169.sql
- This file was added.
-- SWH DB schema upgrade | |||||
-- from_version: 168 | |||||
-- to_version: 169 | |||||
-- description: make (target, authority_id, discovery_date, fetcher_id) non-unique | |||||
insert into dbversion(version, release, description) | |||||
values(169, now(), 'Work In Progress'); | |||||
-- 1. restart swh-storage, so that it stops relying on | |||||
-- raw_extrinsic_metadata_content_authority_date_fetcher being a unique index | |||||
-- 2. rename old index | |||||
alter index raw_extrinsic_metadata_content_authority_date_fetcher | |||||
rename to raw_extrinsic_metadata_content_authority_date_fetcher_unique; | |||||
-- 3. create new (non-unique) index (excluding fetcher, because it was only needed | |||||
-- for uniqueness and not for accesses | |||||
create unique index concurrently raw_extrinsic_metadata_content_authority_date | |||||
on raw_extrinsic_metadata(target, authority_id, discovery_date); | |||||
-- 4. remove old index | |||||
drop index raw_extrinsic_metadata_content_authority_date_fetcher_unique; |