cadc-inventory-db.0.12.1.source-code.inventory.Artifact.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cadc-inventory-db Show documentation
Show all versions of cadc-inventory-db Show documentation
OpenCADC Storage Inventory database library
create table .Artifact (
uri varchar(512) not null,
uriBucket char(5) not null,
contentChecksum varchar(136) not null,
contentLastModified timestamp not null,
contentLength bigint not null,
contentType varchar(128),
contentEncoding varchar(128),
siteLocations uuid[],
storageLocation_storageID varchar(512),
storageLocation_storageBucket varchar(512),
lastModified timestamp not null,
metaChecksum varchar(136) not null,
id uuid not null primary key
);
create unique index uri_index on .Artifact(uri);
create index bucket_index on .Artifact(uriBucket);
--create index a_modified_index on .Artifact(lastModified);
create index a_stored_index on .Artifact(lastModified)
where storageLocation_storageID is not null;
create index a_unstored_index on .Artifact(lastModified)
where storageLocation_storageID is null;
create unique index storage_index on .Artifact(storageLocation_storageBucket,storageLocation_storageID)
where storageLocation_storageID is not null;
© 2015 - 2024 Weber Informatics LLC | Privacy Policy