gnumed-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-bugs] [Gnumed-devel] 1.0.rc5 release


From: Karsten Hilbert
Subject: Re: [Gnumed-bugs] [Gnumed-devel] 1.0.rc5 release
Date: Thu, 6 Oct 2011 15:35:45 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Oct 04, 2011 at 11:03:45AM -0700, Jim Busser wrote:

> I get an error on trying to upgrade the database v15 --> v16

> 2011-10-04 10:59:26  DEBUG     gm.bootstrapper 
> (/Users/djb/Downloads/gnumed-server.16.rc5/Gnumed/pycommon/gmPsql.py::run() 
> #233): 
> alter table ref.loinc drop constraint atc_fk_data_source_fkey cascade
> 2011-10-04 10:59:26  DEBUG     gm.bootstrapper 
> (/Users/djb/Downloads/gnumed-server.16.rc5/Gnumed/pycommon/gmPsql.py::run() 
> #241): ../sql/v15-v16/dynamic/v16-ref-loinc-dynamic.sql:39: constraint 
> "atc_fk_data_source_fkey" of relation "loinc" does not exist

This points to another bug still.

> 2011-10-04 10:59:26  DEBUG     gm.bootstrapper 
> (/Users/djb/Downloads/gnumed-server.16.rc5/Gnumed/pycommon/gmPsql.py::run() 
> #233): 
> alter table ref.loinc
>       add foreign key (fk_data_source)
>               references ref.data_source(pk)
>               on update cascade
>               on delete restrict
> 2011-10-04 10:59:26  ERROR     gm.bootstrapper 
> (/Users/djb/Downloads/gnumed-server.16.rc5/Gnumed/pycommon/gmPsql.py::run() 
> #238): ../sql/v15-v16/dynamic/v16-ref-loinc-dynamic.sql:46: insert or update 
> on table "loinc" violates foreign key constraint 
> "loinc_fk_data_source_fkey"DETAIL:  Key (fk_data_source)=(9) is not present 
> in table "data_source".

This means there's rows in your ref.loinc table which point
to a data souce "9" which does not exist.

Previously the FK from ref.loinc (and friends) into
ref.data_source(pk) was not properly enforced so it may be
possible the data source entry got dropped.

You'll likely have to provide a ref.data_source row with
pk=9.

Can you send the output of

        select * from ref.data_source

?

Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]