Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/sql/60-indexes.sql
Show First 20 Lines • Show All 262 Lines • ▼ Show 20 Lines | |||||
\endif | \endif | ||||
-- raw_extrinsic_metadata | -- raw_extrinsic_metadata | ||||
create unique index concurrently raw_extrinsic_metadata_pkey on raw_extrinsic_metadata(id); | create unique index concurrently raw_extrinsic_metadata_pkey on raw_extrinsic_metadata(id); | ||||
alter table raw_extrinsic_metadata add primary key using index raw_extrinsic_metadata_pkey; | alter table raw_extrinsic_metadata add primary key using index raw_extrinsic_metadata_pkey; | ||||
create unique index concurrently raw_extrinsic_metadata_content_authority_date_fetcher on raw_extrinsic_metadata(target, authority_id, discovery_date, fetcher_id); | create index concurrently raw_extrinsic_metadata_content_authority_date on raw_extrinsic_metadata(target, authority_id, discovery_date); | ||||
olasd: But this one is correct. | |||||
\if :dbflavor_default | \if :dbflavor_default | ||||
alter table raw_extrinsic_metadata add constraint raw_extrinsic_metadata_authority_fkey foreign key (authority_id) references metadata_authority(id) not valid; | alter table raw_extrinsic_metadata add constraint raw_extrinsic_metadata_authority_fkey foreign key (authority_id) references metadata_authority(id) not valid; | ||||
alter table raw_extrinsic_metadata validate constraint raw_extrinsic_metadata_authority_fkey; | alter table raw_extrinsic_metadata validate constraint raw_extrinsic_metadata_authority_fkey; | ||||
alter table raw_extrinsic_metadata add constraint raw_extrinsic_metadata_fetcher_fkey foreign key (fetcher_id) references metadata_fetcher(id) not valid; | alter table raw_extrinsic_metadata add constraint raw_extrinsic_metadata_fetcher_fkey foreign key (fetcher_id) references metadata_fetcher(id) not valid; | ||||
alter table raw_extrinsic_metadata validate constraint raw_extrinsic_metadata_fetcher_fkey; | alter table raw_extrinsic_metadata validate constraint raw_extrinsic_metadata_fetcher_fkey; | ||||
\endif | \endif | ||||
Show All 12 Lines |
But this one is correct.