[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Upgrade psql
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Upgrade psql |
Date: |
Sun, 24 Nov 2013 22:11:10 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Nov 24, 2013 at 05:31:18PM +0530, Vaibhav Banait wrote:
> select * from audit.log_episode where pk = 555;
>
> Generated: 11/24/13 14:04:29
> Database: gnumed_v18 on address@hidden:5433
>
> pk_audit orig_version orig_when orig_by orig_tableoid audit_action
> audit_when audit_by row_version modified_when modified_by pk
> fk_health_issue description is_open fk_encounter
> diagnostic_certainty_classification summary
> 85450 0 2013-10-02 vbanait 187254 DELETE
> 2013-10-02 gm-dbo 0 2013-10-02 vbanait 555
> 1 दिनमे दो बार f 522
> 11:17:09.242+05:30
> 11:22:55.06+05:30 11:17:09.242+05:30
This tells us that our suspicion was correct - there once
was an episode linked to those substance intakes but it
was later deleted and thusly the intakes were orphaned.
This begs the question how this has come about. There
might have been a lack of a proper foreign key definition
at one time. Regardless of whether or not it is important
to find out whether that foreign key exists now. Hence the
other query to which I'll respond in a minute.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346