gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Inadvertent deletion of Procedure when Deleting episo


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Inadvertent deletion of Procedure when Deleting episode
Date: Thu, 1 Aug 2013 14:26:33 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 01, 2013 at 11:55:18AM +0200, Karsten Hilbert wrote:

> I found the explanation of why it was possible to delete the
> clin.episode row with the clin.procedure /
> clin.clin_root_item rows staying in place. Under Inheritance
> the PG Manual says:
> 
>       All check constraints and not-null constraints on a
>       parent table are automatically inherited by its
>       children. Other types of constraints (unique, primary
>       key, and foreign key constraints) are not inherited.

Attached find a script which can be run from within
.../client/testing/ against, say, gnumed_v18 as the GNUmed
database owner which will list rows pointing to non-existent
episodes or encounters and will take a look at the audit
tables to find the DELETEd episodes and encounters:

        $> python crawl-dangling-clin_root_items.py

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

Attachment: crawl-dangling-clin_root_items.py
Description: Text Data


reply via email to

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