Hi Claudia,
I ran pg_dump, as you suggested (see attached), and it looks like all the
three tables (collection2item, community2community, and
community2collection) have 1 foreign key only each. For instance, the
error that I receive complains about comm2coll table not having the
collection_fk and the old issue mentioned is suggesting to delete this
foreign key from the table:
"$2" FOREIGN KEY (collection_id) REFERENCES collection(collection_id)
So, if my table only has the "community_id" foreign key, this old thread
doesn't seem to apply. And if the fkey is not present to be deleted, is
there another way of making DSpace not look for it?
Cheers,
Stan
--
You received this message because you are subscribed to the Google Groups
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.8
-- Dumped by pg_dump version 9.6.8
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
--
-- Name: breakpoint; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE public.breakpoint AS (
func oid,
linenumber integer,
targetname text
);
--
-- Name: frame; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE public.frame AS (
level integer,
targetname text,
func oid,
linenumber integer,
args text
);
--
-- Name: proxyinfo; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE public.proxyinfo AS (
serverversionstr text,
serverversionnum integer,
proxyapiver integer,
serverprocessid integer
);
--
-- Name: targetinfo; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE public.targetinfo AS (
target oid,
schema oid,
nargs integer,
argtypes oidvector,
targetname name,
argmodes "char"[],
argnames text[],
targetlang oid,
fqname text,
returnsset boolean,
returntype oid
);
--
-- Name: var; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE public.var AS (
name text,
varclass character(1),
linenumber integer,
isunique boolean,
isconst boolean,
isnotnull boolean,
dtype oid,
value text
);
--
-- Name: getnextid(character varying); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.getnextid(character varying) RETURNS integer
LANGUAGE sql
AS $_$SELECT CAST (nextval($1 || '_seq') AS INTEGER) AS RESULT $_$;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: bi_2_dis; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bi_2_dis (
id integer NOT NULL,
authority character varying(100),
value text,
sort_value text
);
--
-- Name: bi_2_dis_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bi_2_dis_seq
START WITH 611
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bi_2_dmap; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bi_2_dmap (
map_id integer NOT NULL,
item_id integer,
distinct_id integer
);
--
-- Name: bi_2_dmap_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bi_2_dmap_seq
START WITH 1050
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bi_4_dis; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bi_4_dis (
id integer NOT NULL,
authority character varying(100),
value text,
sort_value text
);
--
-- Name: bi_4_dis_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bi_4_dis_seq
START WITH 1055
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bi_4_dmap; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bi_4_dmap (
map_id integer NOT NULL,
item_id integer,
distinct_id integer
);
--
-- Name: bi_4_dmap_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bi_4_dmap_seq
START WITH 2003
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bi_item; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bi_item (
id integer NOT NULL,
item_id integer,
sort_1 text,
sort_2 text,
sort_3 text
);
--
-- Name: bi_item_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bi_item_seq
START WITH 761
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bi_private; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bi_private (
id integer NOT NULL,
item_id integer,
sort_1 text,
sort_2 text,
sort_3 text
);
--
-- Name: bi_private_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bi_private_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bi_withdrawn; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bi_withdrawn (
id integer NOT NULL,
item_id integer,
sort_1 text,
sort_2 text,
sort_3 text
);
--
-- Name: bi_withdrawn_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bi_withdrawn_seq
START WITH 91
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bitstream; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bitstream (
bitstream_id integer NOT NULL,
bitstream_format_id integer,
name character varying(256),
size_bytes bigint,
checksum character varying(64),
checksum_algorithm character varying(32),
description text,
user_format_description text,
source character varying(256),
internal_id character varying(256),
deleted boolean,
store_number integer,
sequence_id integer
);
--
-- Name: bitstream_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bitstream_seq
START WITH 4747
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bitstreamformatregistry; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bitstreamformatregistry (
bitstream_format_id integer NOT NULL,
mimetype character varying(256),
short_description character varying(128),
description text,
support_level integer,
internal boolean
);
--
-- Name: bitstreamformatregistry_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bitstreamformatregistry_seq
START WITH 79
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bundle; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bundle (
bundle_id integer NOT NULL,
name character varying(16),
primary_bitstream_id integer
);
--
-- Name: bundle2bitstream; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.bundle2bitstream (
id integer NOT NULL,
bundle_id integer,
bitstream_id integer,
bitstream_order integer
);
--
-- Name: bundle2bitstream_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bundle2bitstream_seq
START WITH 4708
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bundle_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.bundle_seq
START WITH 3911
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: checksum_results; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.checksum_results (
result_code character varying NOT NULL,
result_description character varying
);
--
-- Name: collection; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.collection (
collection_id integer NOT NULL,
name character varying(128),
short_description character varying(512),
introductory_text text,
logo_bitstream_id integer,
template_item_id integer,
provenance_description text,
license text,
copyright_text text,
side_bar_text text,
workflow_step_1 integer,
workflow_step_2 integer,
workflow_step_3 integer,
submitter integer,
admin integer
);
--
-- Name: collection2item; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.collection2item (
id integer NOT NULL,
collection_id integer,
item_id integer
);
--
-- Name: collection2item_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.collection2item_seq
START WITH 2158
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: collection_item_count; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.collection_item_count (
collection_id integer NOT NULL,
count integer
);
--
-- Name: collection_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.collection_seq
START WITH 174
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: communities2item; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.communities2item (
id integer NOT NULL,
community_id integer,
item_id integer
);
--
-- Name: communities2item_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.communities2item_seq
START WITH 1453
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: community; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.community (
community_id integer NOT NULL,
name character varying(128),
short_description character varying(512),
introductory_text text,
logo_bitstream_id integer,
copyright_text text,
side_bar_text text,
admin integer
);
--
-- Name: community2collection; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.community2collection (
id integer NOT NULL,
community_id integer,
collection_id integer
);
--
-- Name: community2collection_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.community2collection_seq
START WITH 174
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: community2community; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.community2community (
id integer NOT NULL,
parent_comm_id integer,
child_comm_id integer
);
--
-- Name: community2community_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.community2community_seq
START WITH 42
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: community2item; Type: VIEW; Schema: public; Owner: -
--
CREATE VIEW public.community2item AS
SELECT community2collection.community_id,
collection2item.item_id
FROM public.community2collection,
public.collection2item
WHERE (collection2item.collection_id = community2collection.collection_id);
--
-- Name: community_item_count; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.community_item_count (
community_id integer NOT NULL,
count integer
);
--
-- Name: community_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.community_seq
START WITH 73
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: metadatafieldregistry_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.metadatafieldregistry_seq
START WITH 100
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: metadatafieldregistry; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.metadatafieldregistry (
metadata_field_id integer DEFAULT nextval('public.metadatafieldregistry_seq'::regclass) NOT NULL,
metadata_schema_id integer NOT NULL,
element character varying(64),
qualifier character varying(64),
scope_note text
);
--
-- Name: metadatavalue_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.metadatavalue_seq
START WITH 44394
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: metadatavalue; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.metadatavalue (
metadata_value_id integer DEFAULT nextval('public.metadatavalue_seq'::regclass) NOT NULL,
item_id integer,
metadata_field_id integer,
text_value text,
text_lang character varying(24),
place integer,
authority character varying(100),
confidence integer DEFAULT '-1'::integer
);
--
-- Name: dcvalue; Type: VIEW; Schema: public; Owner: -
--
CREATE VIEW public.dcvalue AS
SELECT metadatavalue.metadata_value_id AS dc_value_id,
metadatavalue.item_id,
metadatavalue.metadata_field_id AS dc_type_id,
metadatavalue.text_value,
metadatavalue.text_lang,
metadatavalue.place
FROM public.metadatavalue,
public.metadatafieldregistry
WHERE ((metadatavalue.metadata_field_id = metadatafieldregistry.metadata_field_id) AND (metadatafieldregistry.metadata_schema_id = 1));
--
-- Name: dcvalue_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.dcvalue_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: doi; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.doi (
doi_id integer NOT NULL,
doi character varying(256),
resource_type_id integer,
resource_id integer,
status integer
);
--
-- Name: doi_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.doi_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: eperson; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.eperson (
eperson_id integer NOT NULL,
email character varying(64),
password character varying(128),
firstname character varying(64),
lastname character varying(64),
can_log_in boolean,
require_certificate boolean,
self_registered boolean,
last_active timestamp(6) without time zone,
sub_frequency integer,
phone character varying(32),
netid character varying(64),
language character varying(64),
salt character varying(32),
digest_algorithm character varying(16)
);
--
-- Name: eperson_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.eperson_seq
START WITH 90
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: epersongroup; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.epersongroup (
eperson_group_id integer NOT NULL,
name character varying(256)
);
--
-- Name: epersongroup2eperson; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.epersongroup2eperson (
id integer NOT NULL,
eperson_group_id integer,
eperson_id integer
);
--
-- Name: epersongroup2eperson_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.epersongroup2eperson_seq
START WITH 228
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: epersongroup2workspaceitem_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.epersongroup2workspaceitem_seq
START WITH 2
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: epersongroup2workspaceitem; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.epersongroup2workspaceitem (
id integer DEFAULT nextval('public.epersongroup2workspaceitem_seq'::regclass) NOT NULL,
eperson_group_id integer,
workspace_item_id integer
);
--
-- Name: epersongroup_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.epersongroup_seq
START WITH 589
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: fileextension; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.fileextension (
file_extension_id integer NOT NULL,
bitstream_format_id integer,
extension character varying(16)
);
--
-- Name: fileextension_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.fileextension_seq
START WITH 90
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: group2group; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.group2group (
id integer NOT NULL,
parent_id integer,
child_id integer
);
--
-- Name: group2group_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.group2group_seq
START WITH 692
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: group2groupcache; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.group2groupcache (
id integer NOT NULL,
parent_id integer,
child_id integer
);
--
-- Name: group2groupcache_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.group2groupcache_seq
START WITH 162402
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: handle; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.handle (
handle_id integer NOT NULL,
handle character varying(256),
resource_type_id integer,
resource_id integer
);
--
-- Name: handle_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.handle_seq
START WITH 1904
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: harvested_collection; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.harvested_collection (
collection_id integer,
harvest_type integer,
oai_source character varying,
oai_set_id character varying,
harvest_message character varying,
metadata_config_id character varying,
harvest_status integer,
harvest_start_time timestamp(6) with time zone,
last_harvested timestamp(6) with time zone,
id integer NOT NULL
);
--
-- Name: harvested_collection_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.harvested_collection_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: harvested_item; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.harvested_item (
item_id integer,
last_harvested timestamp(6) with time zone,
oai_id character varying,
id integer NOT NULL
);
--
-- Name: harvested_item_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.harvested_item_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: history_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.history_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: historystate_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.historystate_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: item; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.item (
item_id integer NOT NULL,
submitter_id integer,
in_archive boolean,
withdrawn boolean,
last_modified timestamp(6) with time zone,
owning_collection integer,
discoverable boolean
);
--
-- Name: item2bundle; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.item2bundle (
id integer NOT NULL,
item_id integer,
bundle_id integer
);
--
-- Name: item2bundle_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.item2bundle_seq
START WITH 3911
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: item_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.item_seq
START WITH 2376
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: metadataschemaregistry_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.metadataschemaregistry_seq
START WITH 5
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: metadataschemaregistry; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.metadataschemaregistry (
metadata_schema_id integer DEFAULT nextval('public.metadataschemaregistry_seq'::regclass) NOT NULL,
namespace character varying(256),
short_id character varying(32)
);
--
-- Name: most_recent_checksum; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.most_recent_checksum (
bitstream_id integer NOT NULL,
to_be_processed boolean NOT NULL,
expected_checksum character varying NOT NULL,
current_checksum character varying NOT NULL,
last_process_start_date timestamp(6) without time zone NOT NULL,
last_process_end_date timestamp(6) without time zone NOT NULL,
checksum_algorithm character varying NOT NULL,
matched_prev_checksum boolean NOT NULL,
result character varying
);
--
-- Name: registrationdata; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.registrationdata (
registrationdata_id integer NOT NULL,
email character varying(64),
token character varying(48),
expires timestamp(6) without time zone
);
--
-- Name: registrationdata_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.registrationdata_seq
START WITH 161
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: requestitem; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.requestitem (
requestitem_id integer NOT NULL,
token character varying(48),
item_id integer,
bitstream_id integer,
allfiles boolean,
request_email character varying(64),
request_name character varying(64),
request_date timestamp(6) without time zone,
accept_request boolean,
decision_date timestamp(6) without time zone,
expires timestamp(6) without time zone
);
--
-- Name: requestitem_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.requestitem_seq
START WITH 5
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: resourcepolicy; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.resourcepolicy (
policy_id integer NOT NULL,
resource_type_id integer,
resource_id integer,
action_id integer,
eperson_id integer,
epersongroup_id integer,
start_date date,
end_date date,
rpname character varying(30),
rptype character varying(30),
rpdescription character varying(100)
);
--
-- Name: resourcepolicy_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.resourcepolicy_seq
START WITH 121482
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: subscription; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.subscription (
subscription_id integer NOT NULL,
eperson_id integer,
collection_id integer
);
--
-- Name: subscription_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.subscription_seq
START WITH 8
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: tasklistitem; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.tasklistitem (
tasklist_id integer NOT NULL,
eperson_id integer,
workflow_id integer
);
--
-- Name: tasklistitem_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.tasklistitem_seq
START WITH 8949
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: versionhistory; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.versionhistory (
versionhistory_id integer NOT NULL
);
--
-- Name: versionhistory_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.versionhistory_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: versionitem; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.versionitem (
versionitem_id integer NOT NULL,
item_id integer,
version_number integer,
eperson_id integer,
version_date timestamp(6) without time zone,
version_summary character varying(255),
versionhistory_id integer
);
--
-- Name: versionitem_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.versionitem_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: webapp; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.webapp (
webapp_id integer NOT NULL,
appname character varying(32),
url character varying,
started timestamp(6) without time zone,
isui integer
);
--
-- Name: webapp_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.webapp_seq
START WITH 347
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: workflowitem; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.workflowitem (
workflow_id integer NOT NULL,
item_id integer,
collection_id integer,
state integer,
owner integer,
multiple_titles boolean,
published_before boolean,
multiple_files boolean
);
--
-- Name: workflowitem_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.workflowitem_seq
START WITH 1851
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: workspaceitem; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.workspaceitem (
workspace_item_id integer NOT NULL,
item_id integer,
collection_id integer,
multiple_titles boolean,
published_before boolean,
multiple_files boolean,
stage_reached integer,
page_reached integer
);
--
-- Name: workspaceitem_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.workspaceitem_seq
START WITH 2392
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bi_2_dis bi_2_dis_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_2_dis
ADD CONSTRAINT bi_2_dis_pkey PRIMARY KEY (id);
--
-- Name: bi_2_dmap bi_2_dmap_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_2_dmap
ADD CONSTRAINT bi_2_dmap_pkey PRIMARY KEY (map_id);
--
-- Name: bi_4_dis bi_4_dis_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_4_dis
ADD CONSTRAINT bi_4_dis_pkey PRIMARY KEY (id);
--
-- Name: bi_4_dmap bi_4_dmap_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_4_dmap
ADD CONSTRAINT bi_4_dmap_pkey PRIMARY KEY (map_id);
--
-- Name: bi_item bi_item_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_item
ADD CONSTRAINT bi_item_pkey PRIMARY KEY (id);
--
-- Name: bi_private bi_private_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_private
ADD CONSTRAINT bi_private_pkey PRIMARY KEY (id);
--
-- Name: bi_withdrawn bi_withdrawn_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_withdrawn
ADD CONSTRAINT bi_withdrawn_pkey PRIMARY KEY (id);
--
-- Name: bitstream bitstream_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bitstream
ADD CONSTRAINT bitstream_pkey PRIMARY KEY (bitstream_id);
--
-- Name: bitstreamformatregistry bitstreamformatregistry_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bitstreamformatregistry
ADD CONSTRAINT bitstreamformatregistry_pkey PRIMARY KEY (bitstream_format_id);
--
-- Name: bitstreamformatregistry bitstreamformatregistry_short_description_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bitstreamformatregistry
ADD CONSTRAINT bitstreamformatregistry_short_description_key UNIQUE (short_description);
--
-- Name: bundle2bitstream bundle2bitstream_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bundle2bitstream
ADD CONSTRAINT bundle2bitstream_pkey PRIMARY KEY (id);
--
-- Name: bundle bundle_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bundle
ADD CONSTRAINT bundle_pkey PRIMARY KEY (bundle_id);
--
-- Name: checksum_results checksum_results_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.checksum_results
ADD CONSTRAINT checksum_results_pkey PRIMARY KEY (result_code);
--
-- Name: collection2item collection2item_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection2item
ADD CONSTRAINT collection2item_pkey PRIMARY KEY (id);
--
-- Name: collection_item_count collection_item_count_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection_item_count
ADD CONSTRAINT collection_item_count_pkey PRIMARY KEY (collection_id);
--
-- Name: collection collection_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection
ADD CONSTRAINT collection_pkey PRIMARY KEY (collection_id);
--
-- Name: communities2item communities2item_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.communities2item
ADD CONSTRAINT communities2item_pkey PRIMARY KEY (id);
--
-- Name: community2collection community2collection_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.community2collection
ADD CONSTRAINT community2collection_pkey PRIMARY KEY (id);
--
-- Name: community2community community2community_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.community2community
ADD CONSTRAINT community2community_pkey PRIMARY KEY (id);
--
-- Name: community_item_count community_item_count_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.community_item_count
ADD CONSTRAINT community_item_count_pkey PRIMARY KEY (community_id);
--
-- Name: community community_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.community
ADD CONSTRAINT community_pkey PRIMARY KEY (community_id);
--
-- Name: doi doi_doi_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.doi
ADD CONSTRAINT doi_doi_key UNIQUE (doi);
--
-- Name: doi doi_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.doi
ADD CONSTRAINT doi_pkey PRIMARY KEY (doi_id);
--
-- Name: eperson eperson_email_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.eperson
ADD CONSTRAINT eperson_email_key UNIQUE (email);
--
-- Name: eperson eperson_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.eperson
ADD CONSTRAINT eperson_pkey PRIMARY KEY (eperson_id);
--
-- Name: epersongroup2eperson epersongroup2eperson_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.epersongroup2eperson
ADD CONSTRAINT epersongroup2eperson_pkey PRIMARY KEY (id);
--
-- Name: epersongroup2workspaceitem epersongroup2workspaceitem_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.epersongroup2workspaceitem
ADD CONSTRAINT epersongroup2workspaceitem_pkey PRIMARY KEY (id);
--
-- Name: epersongroup epersongroup_name_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.epersongroup
ADD CONSTRAINT epersongroup_name_key UNIQUE (name);
--
-- Name: epersongroup epersongroup_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.epersongroup
ADD CONSTRAINT epersongroup_pkey PRIMARY KEY (eperson_group_id);
--
-- Name: fileextension fileextension_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.fileextension
ADD CONSTRAINT fileextension_pkey PRIMARY KEY (file_extension_id);
--
-- Name: group2group group2group_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.group2group
ADD CONSTRAINT group2group_pkey PRIMARY KEY (id);
--
-- Name: group2groupcache group2groupcache_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.group2groupcache
ADD CONSTRAINT group2groupcache_pkey PRIMARY KEY (id);
--
-- Name: handle handle_handle_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.handle
ADD CONSTRAINT handle_handle_key UNIQUE (handle);
--
-- Name: handle handle_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.handle
ADD CONSTRAINT handle_pkey PRIMARY KEY (handle_id);
--
-- Name: harvested_collection harvested_collection_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.harvested_collection
ADD CONSTRAINT harvested_collection_pkey PRIMARY KEY (id);
--
-- Name: harvested_item harvested_item_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.harvested_item
ADD CONSTRAINT harvested_item_pkey PRIMARY KEY (id);
--
-- Name: item2bundle item2bundle_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.item2bundle
ADD CONSTRAINT item2bundle_pkey PRIMARY KEY (id);
--
-- Name: item item_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.item
ADD CONSTRAINT item_pkey PRIMARY KEY (item_id);
--
-- Name: metadatafieldregistry metadatafieldregistry_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.metadatafieldregistry
ADD CONSTRAINT metadatafieldregistry_pkey PRIMARY KEY (metadata_field_id);
--
-- Name: metadataschemaregistry metadataschemaregistry_namespace_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.metadataschemaregistry
ADD CONSTRAINT metadataschemaregistry_namespace_key UNIQUE (namespace);
--
-- Name: metadataschemaregistry metadataschemaregistry_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.metadataschemaregistry
ADD CONSTRAINT metadataschemaregistry_pkey PRIMARY KEY (metadata_schema_id);
--
-- Name: metadataschemaregistry metadataschemaregistry_short_id_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.metadataschemaregistry
ADD CONSTRAINT metadataschemaregistry_short_id_key UNIQUE (short_id);
--
-- Name: metadatavalue metadatavalue_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.metadatavalue
ADD CONSTRAINT metadatavalue_pkey PRIMARY KEY (metadata_value_id);
--
-- Name: most_recent_checksum most_recent_checksum_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.most_recent_checksum
ADD CONSTRAINT most_recent_checksum_pkey PRIMARY KEY (bitstream_id);
--
-- Name: registrationdata registrationdata_email_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.registrationdata
ADD CONSTRAINT registrationdata_email_key UNIQUE (email);
--
-- Name: registrationdata registrationdata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.registrationdata
ADD CONSTRAINT registrationdata_pkey PRIMARY KEY (registrationdata_id);
--
-- Name: requestitem requestitem_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.requestitem
ADD CONSTRAINT requestitem_pkey PRIMARY KEY (requestitem_id);
--
-- Name: requestitem requestitem_token_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.requestitem
ADD CONSTRAINT requestitem_token_key UNIQUE (token);
--
-- Name: resourcepolicy resourcepolicy_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.resourcepolicy
ADD CONSTRAINT resourcepolicy_pkey PRIMARY KEY (policy_id);
--
-- Name: subscription subscription_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.subscription
ADD CONSTRAINT subscription_pkey PRIMARY KEY (subscription_id);
--
-- Name: tasklistitem tasklistitem_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tasklistitem
ADD CONSTRAINT tasklistitem_pkey PRIMARY KEY (tasklist_id);
--
-- Name: versionhistory versionhistory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.versionhistory
ADD CONSTRAINT versionhistory_pkey PRIMARY KEY (versionhistory_id);
--
-- Name: versionitem versionitem_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.versionitem
ADD CONSTRAINT versionitem_pkey PRIMARY KEY (versionitem_id);
--
-- Name: webapp webapp_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.webapp
ADD CONSTRAINT webapp_pkey PRIMARY KEY (webapp_id);
--
-- Name: workflowitem workflowitem_item_id_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.workflowitem
ADD CONSTRAINT workflowitem_item_id_key UNIQUE (item_id);
--
-- Name: workflowitem workflowitem_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.workflowitem
ADD CONSTRAINT workflowitem_pkey PRIMARY KEY (workflow_id);
--
-- Name: workspaceitem workspaceitem_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.workspaceitem
ADD CONSTRAINT workspaceitem_pkey PRIMARY KEY (workspace_item_id);
--
-- Name: bi_2_dis_svalue_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_2_dis_svalue_idx ON public.bi_2_dis USING btree (sort_value);
--
-- Name: bi_2_dis_uvalue_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_2_dis_uvalue_idx ON public.bi_2_dis USING btree (upper(value));
--
-- Name: bi_2_dis_value_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_2_dis_value_idx ON public.bi_2_dis USING btree (value);
--
-- Name: bi_2_dmap_dist_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_2_dmap_dist_idx ON public.bi_2_dmap USING btree (distinct_id);
--
-- Name: bi_2_dmap_item_id_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_2_dmap_item_id_idx ON public.bi_2_dmap USING btree (item_id);
--
-- Name: bi_4_dis_svalue_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_4_dis_svalue_idx ON public.bi_4_dis USING btree (sort_value);
--
-- Name: bi_4_dis_uvalue_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_4_dis_uvalue_idx ON public.bi_4_dis USING btree (upper(value));
--
-- Name: bi_4_dis_value_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_4_dis_value_idx ON public.bi_4_dis USING btree (value);
--
-- Name: bi_4_dmap_dist_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_4_dmap_dist_idx ON public.bi_4_dmap USING btree (distinct_id);
--
-- Name: bi_4_dmap_item_id_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_4_dmap_item_id_idx ON public.bi_4_dmap USING btree (item_id);
--
-- Name: bi_item_item_id_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_item_item_id_idx ON public.bi_item USING btree (item_id);
--
-- Name: bi_item_s1_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_item_s1_idx ON public.bi_item USING btree (sort_1);
--
-- Name: bi_item_s2_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_item_s2_idx ON public.bi_item USING btree (sort_2);
--
-- Name: bi_item_s3_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_item_s3_idx ON public.bi_item USING btree (sort_3);
--
-- Name: bi_private_item_id_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_private_item_id_idx ON public.bi_private USING btree (item_id);
--
-- Name: bi_private_s1_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_private_s1_idx ON public.bi_private USING btree (sort_1);
--
-- Name: bi_private_s2_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_private_s2_idx ON public.bi_private USING btree (sort_2);
--
-- Name: bi_private_s3_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_private_s3_idx ON public.bi_private USING btree (sort_3);
--
-- Name: bi_withdrawn_item_id_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_withdrawn_item_id_idx ON public.bi_withdrawn USING btree (item_id);
--
-- Name: bi_withdrawn_s1_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_withdrawn_s1_idx ON public.bi_withdrawn USING btree (sort_1);
--
-- Name: bi_withdrawn_s2_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_withdrawn_s2_idx ON public.bi_withdrawn USING btree (sort_2);
--
-- Name: bi_withdrawn_s3_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bi_withdrawn_s3_idx ON public.bi_withdrawn USING btree (sort_3);
--
-- Name: bit_bitstream_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bit_bitstream_fk_idx ON public.bitstream USING btree (bitstream_format_id);
--
-- Name: bundle_primary_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX bundle_primary_fk_idx ON public.bundle USING btree (primary_bitstream_id);
--
-- Name: collection2item_collection_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX collection2item_collection_idx ON public.collection2item USING btree (collection_id);
--
-- Name: collection2item_item_id_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX collection2item_item_id_idx ON public.collection2item USING btree (item_id);
--
-- Name: collection_admin_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX collection_admin_fk_idx ON public.collection USING btree (admin);
--
-- Name: collection_logo_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX collection_logo_fk_idx ON public.collection USING btree (logo_bitstream_id);
--
-- Name: collection_submitter_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX collection_submitter_fk_idx ON public.collection USING btree (submitter);
--
-- Name: collection_template_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX collection_template_fk_idx ON public.collection USING btree (template_item_id);
--
-- Name: collection_workflow1_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX collection_workflow1_fk_idx ON public.collection USING btree (workflow_step_1);
--
-- Name: collection_workflow2_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX collection_workflow2_fk_idx ON public.collection USING btree (workflow_step_2);
--
-- Name: collection_workflow3_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX collection_workflow3_fk_idx ON public.collection USING btree (workflow_step_3);
--
-- Name: community2collection_collection_id_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX community2collection_collection_id_idx ON public.community2collection USING btree (collection_id);
--
-- Name: community2collection_community_id_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX community2collection_community_id_idx ON public.community2collection USING btree (community_id);
--
-- Name: community_admin_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX community_admin_fk_idx ON public.community USING btree (admin);
--
-- Name: community_logo_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX community_logo_fk_idx ON public.community USING btree (logo_bitstream_id);
--
-- Name: doi_doi_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX doi_doi_idx ON public.doi USING btree (doi);
--
-- Name: doi_resource_id_and_type_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX doi_resource_id_and_type_idx ON public.doi USING btree (resource_id, resource_type_id);
--
-- Name: eperson_email_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX eperson_email_idx ON public.eperson USING btree (email);
--
-- Name: eperson_netid_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX eperson_netid_idx ON public.eperson USING btree (netid);
--
-- Name: harvested_collection_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX harvested_collection_fk_idx ON public.harvested_collection USING btree (collection_id);
--
-- Name: harvested_item_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX harvested_item_fk_idx ON public.harvested_item USING btree (item_id);
--
-- Name: item_submitter_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX item_submitter_fk_idx ON public.item USING btree (submitter_id);
--
-- Name: metadatafield_schema_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX metadatafield_schema_idx ON public.metadatafieldregistry USING btree (metadata_schema_id);
--
-- Name: metadatavalue_field_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX metadatavalue_field_fk_idx ON public.metadatavalue USING btree (metadata_field_id);
--
-- Name: metadatavalue_item_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX metadatavalue_item_idx ON public.metadatavalue USING btree (item_id);
--
-- Name: metadatavalue_item_idx2; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX metadatavalue_item_idx2 ON public.metadatavalue USING btree (item_id, metadata_field_id);
--
-- Name: workflow_coll_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX workflow_coll_fk_idx ON public.workflowitem USING btree (collection_id);
--
-- Name: workflow_item_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX workflow_item_fk_idx ON public.workflowitem USING btree (item_id);
--
-- Name: workflow_owner_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX workflow_owner_fk_idx ON public.workflowitem USING btree (owner);
--
-- Name: workspace_coll_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX workspace_coll_fk_idx ON public.workspaceitem USING btree (collection_id);
--
-- Name: workspace_item_fk_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX workspace_item_fk_idx ON public.workspaceitem USING btree (item_id);
--
-- Name: bi_2_dmap bi_2_dmap_distinct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_2_dmap
ADD CONSTRAINT bi_2_dmap_distinct_id_fkey FOREIGN KEY (distinct_id) REFERENCES public.bi_2_dis(id);
--
-- Name: bi_2_dmap bi_2_dmap_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_2_dmap
ADD CONSTRAINT bi_2_dmap_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- Name: bi_4_dmap bi_4_dmap_distinct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_4_dmap
ADD CONSTRAINT bi_4_dmap_distinct_id_fkey FOREIGN KEY (distinct_id) REFERENCES public.bi_4_dis(id);
--
-- Name: bi_4_dmap bi_4_dmap_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_4_dmap
ADD CONSTRAINT bi_4_dmap_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- Name: bi_item bi_item_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_item
ADD CONSTRAINT bi_item_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- Name: bi_private bi_private_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_private
ADD CONSTRAINT bi_private_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- Name: bi_withdrawn bi_withdrawn_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bi_withdrawn
ADD CONSTRAINT bi_withdrawn_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- Name: bitstream bitstream_bitstream_format_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bitstream
ADD CONSTRAINT bitstream_bitstream_format_id_fkey FOREIGN KEY (bitstream_format_id) REFERENCES public.bitstreamformatregistry(bitstream_format_id);
--
-- Name: bundle2bitstream bundle2bitstream_bitstream_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bundle2bitstream
ADD CONSTRAINT bundle2bitstream_bitstream_id_fkey FOREIGN KEY (bitstream_id) REFERENCES public.bitstream(bitstream_id);
--
-- Name: bundle2bitstream bundle2bitstream_bundle_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bundle2bitstream
ADD CONSTRAINT bundle2bitstream_bundle_id_fkey FOREIGN KEY (bundle_id) REFERENCES public.bundle(bundle_id);
--
-- Name: bundle bundle_primary_bitstream_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.bundle
ADD CONSTRAINT bundle_primary_bitstream_id_fkey FOREIGN KEY (primary_bitstream_id) REFERENCES public.bitstream(bitstream_id);
--
-- Name: collection2item collection2item_collection_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection2item
ADD CONSTRAINT collection2item_collection_id_fkey FOREIGN KEY (collection_id) REFERENCES public.collection(collection_id);
--
-- Name: collection collection_admin_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection
ADD CONSTRAINT collection_admin_fkey FOREIGN KEY (admin) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: collection_item_count collection_item_count_collection_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection_item_count
ADD CONSTRAINT collection_item_count_collection_id_fkey FOREIGN KEY (collection_id) REFERENCES public.collection(collection_id);
--
-- Name: collection collection_logo_bitstream_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection
ADD CONSTRAINT collection_logo_bitstream_id_fkey FOREIGN KEY (logo_bitstream_id) REFERENCES public.bitstream(bitstream_id);
--
-- Name: collection collection_submitter_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection
ADD CONSTRAINT collection_submitter_fkey FOREIGN KEY (submitter) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: collection collection_template_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection
ADD CONSTRAINT collection_template_item_id_fkey FOREIGN KEY (template_item_id) REFERENCES public.item(item_id);
--
-- Name: collection collection_workflow_step_1_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection
ADD CONSTRAINT collection_workflow_step_1_fkey FOREIGN KEY (workflow_step_1) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: collection collection_workflow_step_2_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection
ADD CONSTRAINT collection_workflow_step_2_fkey FOREIGN KEY (workflow_step_2) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: collection collection_workflow_step_3_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.collection
ADD CONSTRAINT collection_workflow_step_3_fkey FOREIGN KEY (workflow_step_3) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: communities2item communities2item_community_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.communities2item
ADD CONSTRAINT communities2item_community_id_fkey FOREIGN KEY (community_id) REFERENCES public.community(community_id);
--
-- Name: communities2item communities2item_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.communities2item
ADD CONSTRAINT communities2item_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- Name: community2collection community2collection_community_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.community2collection
ADD CONSTRAINT community2collection_community_id_fkey FOREIGN KEY (community_id) REFERENCES public.community(community_id);
--
-- Name: community2community community2community_parent_comm_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.community2community
ADD CONSTRAINT community2community_parent_comm_id_fkey FOREIGN KEY (parent_comm_id) REFERENCES public.community(community_id);
--
-- Name: community community_admin_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.community
ADD CONSTRAINT community_admin_fkey FOREIGN KEY (admin) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: community_item_count community_item_count_community_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.community_item_count
ADD CONSTRAINT community_item_count_community_id_fkey FOREIGN KEY (community_id) REFERENCES public.community(community_id);
--
-- Name: community community_logo_bitstream_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.community
ADD CONSTRAINT community_logo_bitstream_id_fkey FOREIGN KEY (logo_bitstream_id) REFERENCES public.bitstream(bitstream_id);
--
-- Name: epersongroup2eperson epersongroup2eperson_eperson_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.epersongroup2eperson
ADD CONSTRAINT epersongroup2eperson_eperson_group_id_fkey FOREIGN KEY (eperson_group_id) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: epersongroup2eperson epersongroup2eperson_eperson_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.epersongroup2eperson
ADD CONSTRAINT epersongroup2eperson_eperson_id_fkey FOREIGN KEY (eperson_id) REFERENCES public.eperson(eperson_id);
--
-- Name: epersongroup2workspaceitem epersongroup2workspaceitem_eperson_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.epersongroup2workspaceitem
ADD CONSTRAINT epersongroup2workspaceitem_eperson_group_id_fkey FOREIGN KEY (eperson_group_id) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: epersongroup2workspaceitem epersongroup2workspaceitem_workspace_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.epersongroup2workspaceitem
ADD CONSTRAINT epersongroup2workspaceitem_workspace_item_id_fkey FOREIGN KEY (workspace_item_id) REFERENCES public.workspaceitem(workspace_item_id);
--
-- Name: fileextension fileextension_bitstream_format_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.fileextension
ADD CONSTRAINT fileextension_bitstream_format_id_fkey FOREIGN KEY (bitstream_format_id) REFERENCES public.bitstreamformatregistry(bitstream_format_id);
--
-- Name: group2group group2group_child_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.group2group
ADD CONSTRAINT group2group_child_id_fkey FOREIGN KEY (child_id) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: group2group group2group_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.group2group
ADD CONSTRAINT group2group_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: group2groupcache group2groupcache_child_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.group2groupcache
ADD CONSTRAINT group2groupcache_child_id_fkey FOREIGN KEY (child_id) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: group2groupcache group2groupcache_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.group2groupcache
ADD CONSTRAINT group2groupcache_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: harvested_collection harvested_collection_collection_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.harvested_collection
ADD CONSTRAINT harvested_collection_collection_id_fkey FOREIGN KEY (collection_id) REFERENCES public.collection(collection_id) ON DELETE CASCADE;
--
-- Name: harvested_item harvested_item_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.harvested_item
ADD CONSTRAINT harvested_item_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id) ON DELETE CASCADE;
--
-- Name: item2bundle item2bundle_bundle_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.item2bundle
ADD CONSTRAINT item2bundle_bundle_id_fkey FOREIGN KEY (bundle_id) REFERENCES public.bundle(bundle_id);
--
-- Name: item2bundle item2bundle_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.item2bundle
ADD CONSTRAINT item2bundle_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- Name: item item_submitter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.item
ADD CONSTRAINT item_submitter_id_fkey FOREIGN KEY (submitter_id) REFERENCES public.eperson(eperson_id);
--
-- Name: metadatafieldregistry metadatafieldregistry_metadata_schema_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.metadatafieldregistry
ADD CONSTRAINT metadatafieldregistry_metadata_schema_id_fkey FOREIGN KEY (metadata_schema_id) REFERENCES public.metadataschemaregistry(metadata_schema_id);
--
-- Name: metadatavalue metadatavalue_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.metadatavalue
ADD CONSTRAINT metadatavalue_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- Name: metadatavalue metadatavalue_metadata_field_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.metadatavalue
ADD CONSTRAINT metadatavalue_metadata_field_id_fkey FOREIGN KEY (metadata_field_id) REFERENCES public.metadatafieldregistry(metadata_field_id);
--
-- Name: most_recent_checksum most_recent_checksum_bitstream_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.most_recent_checksum
ADD CONSTRAINT most_recent_checksum_bitstream_id_fkey FOREIGN KEY (bitstream_id) REFERENCES public.bitstream(bitstream_id);
--
-- Name: most_recent_checksum most_recent_checksum_result_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.most_recent_checksum
ADD CONSTRAINT most_recent_checksum_result_fkey FOREIGN KEY (result) REFERENCES public.checksum_results(result_code);
--
-- Name: resourcepolicy resourcepolicy_eperson_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.resourcepolicy
ADD CONSTRAINT resourcepolicy_eperson_id_fkey FOREIGN KEY (eperson_id) REFERENCES public.eperson(eperson_id);
--
-- Name: resourcepolicy resourcepolicy_epersongroup_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.resourcepolicy
ADD CONSTRAINT resourcepolicy_epersongroup_id_fkey FOREIGN KEY (epersongroup_id) REFERENCES public.epersongroup(eperson_group_id);
--
-- Name: subscription subscription_collection_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.subscription
ADD CONSTRAINT subscription_collection_id_fkey FOREIGN KEY (collection_id) REFERENCES public.collection(collection_id);
--
-- Name: subscription subscription_eperson_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.subscription
ADD CONSTRAINT subscription_eperson_id_fkey FOREIGN KEY (eperson_id) REFERENCES public.eperson(eperson_id);
--
-- Name: tasklistitem tasklistitem_eperson_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tasklistitem
ADD CONSTRAINT tasklistitem_eperson_id_fkey FOREIGN KEY (eperson_id) REFERENCES public.eperson(eperson_id);
--
-- Name: tasklistitem tasklistitem_workflow_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tasklistitem
ADD CONSTRAINT tasklistitem_workflow_id_fkey FOREIGN KEY (workflow_id) REFERENCES public.workflowitem(workflow_id);
--
-- Name: versionitem versionitem_eperson_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.versionitem
ADD CONSTRAINT versionitem_eperson_id_fkey FOREIGN KEY (eperson_id) REFERENCES public.eperson(eperson_id);
--
-- Name: versionitem versionitem_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.versionitem
ADD CONSTRAINT versionitem_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- Name: versionitem versionitem_versionhistory_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.versionitem
ADD CONSTRAINT versionitem_versionhistory_id_fkey FOREIGN KEY (versionhistory_id) REFERENCES public.versionhistory(versionhistory_id);
--
-- Name: workflowitem workflowitem_collection_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.workflowitem
ADD CONSTRAINT workflowitem_collection_id_fkey FOREIGN KEY (collection_id) REFERENCES public.collection(collection_id);
--
-- Name: workflowitem workflowitem_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.workflowitem
ADD CONSTRAINT workflowitem_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- Name: workflowitem workflowitem_owner_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.workflowitem
ADD CONSTRAINT workflowitem_owner_fkey FOREIGN KEY (owner) REFERENCES public.eperson(eperson_id);
--
-- Name: workspaceitem workspaceitem_collection_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.workspaceitem
ADD CONSTRAINT workspaceitem_collection_id_fkey FOREIGN KEY (collection_id) REFERENCES public.collection(collection_id);
--
-- Name: workspaceitem workspaceitem_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.workspaceitem
ADD CONSTRAINT workspaceitem_item_id_fkey FOREIGN KEY (item_id) REFERENCES public.item(item_id);
--
-- PostgreSQL database dump complete
--