gnumed-bugs
[Top][All Lists]
Advanced

[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: Busser, Jim
Subject: Re: [Gnumed-bugs] GNUmed 1.5.0 - needs one more fixup relating to test orgs?
Date: Fri, 16 Jan 2015 19:31:29 +0000

On 2015-01-15, at 11:16 PM, Karsten Hilbert <address@hidden> wrote:

> On Fri, Jan 16, 2015 at 07:40:32AM +0100, Karsten Hilbert wrote:
> 
>>              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.
> 
> Anyone needing a quicker fix can use the attached file.

I regret that the change of '1' to 'pk' did not fix my problem. When I try to 
run the upgrade, I still get

    2015-01-16 11:16:54  INFO      gm.bootstrapper 
(./bootstrap_gm_db_system.py::_import_schema() #1472): successfully imported 
[../sql/v19-v20/dynamic/v20-clin-v_incoming_data_unmatched.sql]
    2015-01-16 11:16:54  DEBUG     gm.bootstrapper 
(/Users/Shared/gnumed-server.20.2/Gnumed/pycommon/gmPsql.py::run() #233): 
    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 pk from dem.org_unit where
                        description = 'branch of unknown laboratory'
                                and
                        fk_org = (select pk from dem.org where description = 
'unknown laboratory')
        )
    )
    2015-01-16 11:16:54  ERROR     gm.bootstrapper 
(/Users/Shared/gnumed-server.20.2/Gnumed/pycommon/gmPsql.py::run() #238): 
../sql/v19-v20/dynamic/v20-clin-test_type-dynamic.sql:55: 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".
    2015-01-16 11:16:54  ERROR     gm.bootstrapper 
(./bootstrap_gm_db_system.py::_import_schema() #1474): failed to import 
[../sql/v19-v20/dynamic/v20-clin-test_type-dynamic.sql]
    2015-01-16 11:16:54  ERROR     gm.bootstrapper 
(./bootstrap_gm_db_system.py::bootstrap() #1320): Cannot import schema 
definition for bundle [v19-v20-dynamic] into database [gnumed_v20].
    2015-01-16 11:16:54  ERROR     gm.bootstrapper 
(./bootstrap_gm_db_system.py::exit_with_msg() #1487): Cannot bootstrap bundles.
    2015-01-16 11:16:54  INFO      gm.bootstrapper 
(./bootstrap_gm_db_system.py::exit_with_msg() #1488): shutdown

-- Jim





reply via email to

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