[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-bugs] [Gnumed-devel] 1.0.rc5 release
From: |
Jim Busser |
Subject: |
Re: [Gnumed-bugs] [Gnumed-devel] 1.0.rc5 release |
Date: |
Thu, 06 Oct 2011 10:04:02 -0700 |
On 2011-10-06, at 6:35 AM, Karsten Hilbert wrote:
>> 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
So as to unclutter the output, I constrained on pk > 2:
select pk_audit, pk, name_short, version,
row_version, modified_when, modified_by
from ref.data_source where pk > 2 ;
gnumed_v15->
pk_audit | pk | name_short | version | row_version |
modified_when | modified_by
----------+----+------------+---------------+-------------+-------------------------------+-------------
12016 | 3 | Aust NIPS | 2005 | 0 | 2010-07-05
11:51:09.288217-07 | gm-dbo
12111 | 4 | SFCVC | December 2004 | 0 | 2010-07-05
11:51:10.674081-07 | gm-dbo
12772 | 5 | ATC | 2009-01-EN | 0 | 2011-04-08
12:38:58.583321-07 | gm-dbo
12773 | 6 | ATC | 2009-01-DE | 0 | 2011-04-08
12:38:58.583321-07 | gm-dbo
12774 | 7 | ATC | 2009-01-FR | 0 | 2011-04-08
12:38:58.583321-07 | gm-dbo
13331 | 8 | FreeDiams | 0.5.4 | 0 | 2011-05-05
14:39:50.368841-07 | any-doc
13891 | 10 | LOINC | 2.26 | 0 | 2011-07-28
08:13:24.483741-07 | any-doc
(7 rows)
Which confirms the absence of pk=9, only I am not sure why. I then checked the
audit table
audit.log_data_source
as
select pk_audit, pk, name_short, orig_when,
modified_when, orig_by, modified_by, audit_when, audit_by
from audit.log_data_source ;
and got
pk_audit | pk | name_short | orig_when |
modified_when | orig_by | modified_by | audit_when |
audit_by
----------+----+------------+-------------------------------+-------------------------------+---------+-------------+-------------------------------+----------
13374 | 9 | LOINC | 2011-05-10 00:03:48.570398-07 | 2011-05-10
00:03:48.570398-07 | any-doc | any-doc | 2011-07-28 08:13:24.483741-07 |
gm-dbo
(1 row)
I cannot remember myself doing any primary import of LOINC so wonder whether pk
9 might have gotten created using
Master data > Update LOINC
and, since I cannot remember myself deleting pk 9 (though it is possible)
whether on July 28th it could have been the rerunning of
Master data > Update LOINC
which deleted pk 9 as part of importing (creating) a new LOINC
?
-- Jim
Message not available