[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-bugs] GNUmed 1.5.0 - needs one more fixup relating to test o
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-bugs] GNUmed 1.5.0 - needs one more fixup relating to test orgs? |
Date: |
Fri, 16 Jan 2015 07:40:32 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Jan 15, 2015 at 05:52:15PM +0000, Jim Busser wrote:
> I seem to have gotten past the schema requirements, except it seems my
> database contains data that violates a constraint that v20 would like to
> apply, and preventing me from completing the upgrade. The problem is:
>
> insert or update on table "test_org" violates foreign key constraint
> "test_org_fk_org_unit_fkey"DETAIL: Key (fk_org_unit)=(1) is not present in
> table "org_unit".
A real bug ! :-))
Lookee here:
insert into clin.test_org (fk_org_unit, comment)
select
(select 1 from dem.org_unit where
description = 'branch of unknown laboratory'
and
fk_org = (select pk from dem.org where
description = 'unknown laboratory')
),
'auto-generated by v20-clin-test_type-dynamic.sql'::text
where not exists (
select 1 from clin.test_org where fk_org_unit = (
=> select 1 from dem.org_unit where
description = 'branch of unknown
laboratory'
and
fk_org = (select pk from dem.org where
description = 'unknown laboratory')
)
)
=> this must be "select pk from dem.org_unit where" ...
That's why I always hope for people to test the upgrade with
their respective databases. It worked in all three of mine
(deploy, devel, public) since all of them do have a
clin.test_org the fk_org_unit of which just so happens to be 1 :-)
Fixed for 1.5.2 to be released today.
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346