gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Identifying the current revision of the GNUmed databa


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Identifying the current revision of the GNUmed database (was Country zones and i18n)
Date: Mon, 28 Nov 2011 10:46:40 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Nov 27, 2011 at 05:26:17PM +0000, Jim Busser wrote:

> >> BTW how does one identify in psql the current 'decimal
> >> version' of gnumed? I tried looking in the tables in schema
> >> 'gm' but could not find it there 
> > 
> > That is not possible.
> > 
> > But there's another (quite low level) test: you can check
> > the table gm.schema_revision for the string which the fixup
> > file inserted:
> > 
> >     select gm.log_script_insertion('v16-i18n-fixup.sql', '16.4');
> > 
> > with:
> > 
> >     select from gm.schema_revision where filename = ... and version = ...;
> 
> Ah ok, for v16:
> 
>       gnumed_v16=> select * from gm.schema_revision where position('v16' in 
> filename) = 1 and position('fixup' in filename) > 0 order by pk ;
> 
> pk  |               filename                | version |           imported    
>         
> -----+---------------------------------------+---------+-------------------------------
> 585 | v16-clin-v_narrative4search-fixup.sql | 16.1    | 2011-11-26 
> 16:16:04.580231-08
> 586 | v16-cfg-report_query-fixup.sql        | 16.1    | 2011-11-26 
> 16:16:05.023574-08
> 587 | v16-i18n-fixup.sql                    | 16.4    | 2011-11-26 
> 16:16:05.423471-08
> 588 | v16-blobs-doc_desc-fixup.sql          | 16.5    | 2011-11-26 
> 16:16:05.869795-08

In a way, yes, except that you shouldn't get too involved
with the .version column. It may be wrong, it may have a
different format.

I would look out for the actual filename that I need to have
installed instead.

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



reply via email to

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