Re: [dspace-tech] Error deleting a collection

2018-05-08 Thread Stanislav Orlov
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 dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
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

Re: [dspace-tech] Error deleting a collection

2018-05-08 Thread Claudia Jürgen

Hello Stanislav,

you most likely did not run into the problem, because you never tried to delete 
anything. There might be issues with collection2item, community2community, too 
if my guess is right that this was this old issue:
http://dspace.2283337.n4.nabble.com/Dspace-tech-running-the-15-to-16-script-td3280357.html

Since  DSpace 5 there is a database command line tool which can
a) info about the db (including missing/faild migration)
b) repair the db (trying to run migrations)

But you are using 4.

I'm no DB expert just know some basic stuff so anybody out there knowing a 
tool/elegant solution?

At the moment you can compare your database with the database schema of DSpace, 
first identifying the discrepancies.
You can generate a description of your db with
pg_dump --schema-only --no-owner Your_Database_Name > YourDatabaseCreation.sql

If it is really only the above mentioned constraints which are screwed up, 
follow the instructions in the thread above, with the usual warning about 
backing up everything properly first.

Hope this helps

Claudia Jürgen

Am 07.05.2018 um 20:46 schrieb Stanislav Orlov:

Thank you Claudia,

We started ten years ago and went through a few upgrades. I can see how
this problem might have been created during the process, but we never ran
into the problem until now.  If I look at foreign keys for
community2collection table, I see this:

Name: community2collection_community_id_fkey
Fields: community_id
Referenced Schema: public
Referenced Table: community
Referenced Fields: community_id
On Delete: NO ACTION
On Update: NO ACTION

What do I need to do to fix this?

Stan




--
Claudia Juergen
Eldorado

Technische Universität Dortmund
Universitätsbibliothek
Vogelpothsweg 76
44227 Dortmund

Tel.: +49 231-755 40 43
Fax: +49 231-755 40 32
claudia.juer...@tu-dortmund.de
www.ub.tu-dortmund.de

Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist 
ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese 
E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und 
vernichten Sie diese Mail. Vielen Dank.
Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen 
ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform 
(mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen 
Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential. It is 
solely intended for the recipient. If you are not the intended recipient of 
this e-mail please contact the sender and delete this message. Thank you. 
Without prejudice of e-mail correspondence, our statements are only legally 
binding when they are made in the conventional written form (with personal 
signature) or when such documents are sent by fax.

--
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 dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


Re: [dspace-tech] Error deleting a collection

2018-05-07 Thread Stanislav Orlov
Thank you Claudia,

We started ten years ago and went through a few upgrades. I can see how 
this problem might have been created during the process, but we never ran 
into the problem until now.  If I look at foreign keys for 
community2collection table, I see this: 

Name: community2collection_community_id_fkey
Fields: community_id
Referenced Schema: public
Referenced Table: community
Referenced Fields: community_id
On Delete: NO ACTION
On Update: NO ACTION 

What do I need to do to fix this?

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 dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


Re: [dspace-tech] Error deleting a collection

2018-05-07 Thread Claudia Jürgen

Hello Stanislav,

are you using Postgres or Oracle and is this an original 4.0
installation or did you upgrade from an older version?
If you are using Postgres and did upgrade there may have been an issue
with the upgrade process.
The constraint is here:
https://github.com/DSpace/DSpace/blob/dspace-4.0/dspace/etc/postgres/database_schema.sql#L410
and was added during 1.5 to 1.6
https://github.com/DSpace/DSpace/blob/dspace-4.0/dspace/etc/postgres/database_schema_15-16.sql#L106

You may  inspect your db  for the foreign keys:
psql [YourDBName]
\d [TableName]
will show you the foreign keys.
\d community2collection

There has been an issue with the upgrade process, maybe your problem in
an aftereffect of this:
http://dspace.2283337.n4.nabble.com/Dspace-tech-running-the-15-to-16-script-td3280357.html

Hope this helps

Claudia


Am 04.05.2018 um 04:07 schrieb Stanislav Orlov:

Greetings!

When I try to delete collections in DSpace 4.0 on Windows Server 2008, I
have the following error:

org.postgresql.util.PSQLException: ERROR: constraint
"comm2coll_collection_fk" does not exist

Our PostgreSQL has a "community2collection" table with one foreign key -
"community_id" - so I don't know what needs to be done to fix it.  You help
will be most welcome.

Stan



Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist 
ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese 
E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und 
vernichten Sie diese Mail. Vielen Dank.
Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen 
ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform 
(mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen 
Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential. It is 
solely intended for the recipient. If you are not the intended recipient of 
this e-mail please contact the sender and delete this message. Thank you. 
Without prejudice of e-mail correspondence, our statements are only legally 
binding when they are made in the conventional written form (with personal 
signature) or when such documents are sent by fax.

--
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 dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Error deleting a collection

2018-05-03 Thread Stanislav Orlov
Greetings!

When I try to delete collections in DSpace 4.0 on Windows Server 2008, I 
have the following error:

org.postgresql.util.PSQLException: ERROR: constraint 
"comm2coll_collection_fk" does not exist

Our PostgreSQL has a "community2collection" table with one foreign key - 
"community_id" - so I don't know what needs to be done to fix it.  You help 
will be most welcome.

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 dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Error deleting a collection

2018-05-02 Thread Stanislav Orlov
Greetings!

When I try to delete collections in DSpace 4.0 on Windows Server 2008, I 
have the following error:

org.postgresql.util.PSQLException: ERROR: constraint 
"comm2coll_collection_fk" does not exist

Our PostgreSQL has a "community2collection" table with one foreign key - 
"community_id" - so I don't know what needs to be done to fix it.  You help 
will be most welcome.

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 dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.