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: Busser, Jim
Subject: Re: [Gnumed-devel] Identifying the current revision of the GNUmed database (was Country zones and i18n)
Date: Mon, 28 Nov 2011 16:00:54 +0000

On 2011-11-28, at 1:46 AM, Karsten Hilbert wrote:

> 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.

I am not sure how tech support would know what name they are looking for except 
if the error log would happen to name it, or if it happened to be discussed on 
the dev list.

I was just thinking it could be helpful for IT to check the state of how far a 
database has been updated.

Also, I can't find any such string as you named above in gm.schema_revision. 
When I search for the following string within the files in my clone of git

        select gm.log_script_insertion

I am shown a long list of .sql files and so maybe what was being said is to 
select from gm_schema_revision where

        position('v16-i18n-fixup.sql' in filename) =1

?

-- Jim
-- Jim


reply via email to

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