Virtual Beer for all as well. I've just ran into this, (Tim pointed me to
it from IRC).

My version of the SQL, wrapping in a transaction, to be safe, is:

BEGIN;

ALTER TABLE metadatavalue DROP CONSTRAINT "$1";
ALTER TABLE metadatavalue ADD CONSTRAINT metadatavalue_item_id_fkey FOREIGN
KEY(item_id) REFERENCES item(item_id);

COMMIT;



We're not sure of what the cause is.
12:47 PM <tdonohue> yea, I'm not sure either. :)  It's definitely a
"glitch" that happens sometimes (since others have seen it too). But,
according to the PostgreSQL docs, these contraints are SUPPOSED to be named
[table]_[column]_fkey
12:47 PM <tdonohue> So, it seems like something has changed in Postgres, or
Postgres doesn't always follow it's own "rules"

________________
Peter Dietz
Longsight
www.longsight.com
pe...@longsight.com
p: 740-599-5005 x809

On Wed, Apr 1, 2015 at 12:26 PM, Wally Grotophorst <wal...@gmu.edu> wrote:

> BINGO!   A virtual beer for you!
>
> Thanks for the clear statement (no pun intended) of what I needed to
> do.  Worked like a charm.
>
> - Wally
>
>
>
> Bill Tantzen wrote:
> > Wally,
> > Here's what I did:
> >
> > dspace=>  \d metadatavalue
> >                                           Table "public.metadatavalue"
> > ...
> > ...
> > ...
> >
> > Foreign-key constraints:
> >      "$1" FOREIGN KEY (item_id) REFERENCES item(item_id)
> >      "$2" FOREIGN KEY (metadata_field_id) REFERENCES
> > metadatafieldregistry(metadata_field_id)
> >
> > If your Foreign-key constraints look like the above, do the following:
> >
> > dspace=>  ALTER TABLE metadatavalue DROP CONSTRAINT "$1";
> > ALTER TABLE
> > dspace=>  ALTER TABLE metadatavalue ADD CONSTRAINT
> > metadatavalue_item_id_fkey FOREIGN KEY(item_id) REFERENCES
> > item(item_id);
> > ALTER TABLE
> >
> > Then, try the conversion!
> > Cheers,
> > Bill
> >
> > On Wed, Apr 1, 2015 at 9:47 AM, Wally Grotophorst<wal...@gmu.edu>
> wrote:
> >> Trying to install 5.1 on a 4.1 database...on a new server (as a test)
> >> but using my 4.1 database that's imported into Postgres before I launch
> >> tomcat/dspace.
> >>
> >> Starts to make the schema conversion, then bombs.  This part of the log
> >> looks like it's trying to tell me the problem:
> >>
> >>    at org.flywaydb.core.Flyway.migrate(Flyway.java:811)
> >>           at
> >>
> org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:419)
> >>           ... 21 more
> >> Caused by: org.postgresql.util.PSQLException: ERROR: constraint
> >> "metadatavalue_item_id_fkey" of relation "metadatavalue" does not exist
> >>           at
> >>
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
> >>           at
> >>
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
> >>           at
> >>
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
> >>
> >>
> >> I saw some comment about this issue in a few earlier posts but couldn't
> >> figure out how to fix this from the info in the message traffic.  Is
> >> there a simple SQL fix I can run prior to trying again?  Or maybe
> >> something else?
> >>
> >> Platform:  OSX 10.10.1
> >> tomcat:  7.0.59
> >> postgres: 9.3
> >> dspace (trying 5.1)
> >>
> >> - Wally
> >>
> >> Wally Grotophorst
> >> Associate University Librarian
> >> George Mason University
> >> Fairfax, Virginia 22030
> >> (703) 993-9005
> >>
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> >> by Intel and developed in partnership with Slashdot Media, is your hub
> for all
> >> things parallel software development, from weekly thought leadership
> blogs to
> >> news, videos, case studies, tutorials and more. Take a look and join the
> >> conversation now. http://goparallel.sourceforge.net/
> >> _______________________________________________
> >> DSpace-tech mailing list
> >> DSpace-tech@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> >> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to