Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs in misc/db/PostgreSQL/series/PG_update_43_44*.sql #554

Open
EHJ-52n opened this issue Jun 21, 2017 · 2 comments
Open

Bugs in misc/db/PostgreSQL/series/PG_update_43_44*.sql #554

EHJ-52n opened this issue Jun 21, 2017 · 2 comments
Assignees
Labels

Comments

@EHJ-52n
Copy link
Member

EHJ-52n commented Jun 21, 2017

  1. Missing whitespace after constraint name in line 103 in PG_update_43_44.sql:
    alter table public.featureparameter add constraint FK_4ps6yv41rwnbu3q0let2v7foreign key (featureOfInterestId) references public.featureofinterest;
    Should be
    alter table public.featureparameter add constraint FK_4ps6yv41rwnbu3q0let2v7 foreign key (featureOfInterestId) references public.featureofinterest;
  2. In addtion, please replace the cyrptic constraint names:
    • FK_4ps6yv41rwnbu3q0let2v7
    • FK_3v5iovcndi9w0hgh827hcvivw
    • FK_g0f0mpuxn3co65uwud4pwxh4q
    • FK_m4nuof4x6w253biuu1r6ttnqc
  3. Add the missing ; to line 123 in PG_update_43_44.sql:
    create sequence public.relatedObservationId_seq
    Should be
    create sequence public.relatedObservationId_seq;
  4. Add missing alias definition for ser to lline33 in PG_update_43_44_series_table.sql:
    update public.series ser set offeringId = (Select distinct off.offeringId from public.offering off, public.observation o, public.observationhasoffering ohof where ser.seriesid = o.seriesid AND o.observationid = ohof.observationid AND ohof.offeringId = off.offeringId);
    Should be
    update public.series ser set offeringId = (Select distinct off.offeringId from public.offering off, public.observation o, public.observationhasoffering ohof, public.series ser where ser.seriesid = o.seriesid AND o.observationid = ohof.observationid AND ohof.offeringId = off.offeringId);
@EHJ-52n EHJ-52n added the bug label Jun 21, 2017
@EHJ-52n EHJ-52n changed the title Bugs in misc/db/PostgreSQL/series/PG_update_43_44.sql Bugs in misc/db/PostgreSQL/series/PG_update_43_44*.sql Jun 21, 2017
@ghost
Copy link

ghost commented Sep 22, 2017

I've been scripting the update of some 4.3.x databases to 4.4.0, using the PostgreSQL .sql files from the develop branch. If I include all the comments above except for the very last one, AFAIK it works OK, all the clients appear fine.

if I include the last comment, and add the ser alias definition I get the following error when converting:

ERROR:  more than one row returned by a subquery used as an expression
STATEMENT:  update public.series ser set offeringId = (Select distinct off.offeringId from public.offering off, public.observation o, public.observationhasoffering ohof, public.series ser where ser.seriesid = o.seriesid AND o.observationid = ohof.observationid AND ohof.offeringId = off.offeringId);

@himanshusharma27
Copy link

I want to work on this issue . Please assign me this issue .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants