gnumed-bugs
[Top][All Lists]
Advanced

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

Re: [Gnumed-bugs] Problem with rc7 bootstrap


From: Karsten Hilbert
Subject: Re: [Gnumed-bugs] Problem with rc7 bootstrap
Date: Sat, 22 Oct 2011 22:09:33 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Oct 22, 2011 at 12:41:20PM -0700, Jim Busser wrote:

> > Your v15 schema is broken (missing/additional table/column
> > or modified column data type). You will need to fix that or
> > re-bootstrap a v15 database before being able to upgrade
> > that into v16.

While I'm glad about

> after dropping which I had no trouble with
> 
>       sh upgrade-db.sh 15 16

I'm not so sure that it's due to

> Ah… it was my failure to have dropped
> 
>       staging.org (a table of my creation)

because of this:

        create or replace function gm.concat_table_structure_v3()
                returns text
                language 'plpgsql'
                security definer
                as '
        declare
                _row record;
                _total text;
        begin
                _total := '''';
                -- schema.table.column.data_type
                for _row in
                        select * from information_schema.columns cols
                                where cols.table_name in (
                                        select tabs.table_name from 
information_schema.tables tabs where
                                                -- those which hold clinical 
data
                                                tabs.table_schema in (''dem'', 
''clin'', ''blobs'', ''cfg'', ''ref'', ''i18n'') and
                                                tabs.table_type = ''BASE TABLE''
                                        )
                                order by
                                        decode(md5(cols.table_schema || 
cols.table_name || cols.column_name || cols.data_type), ''hex'')
                loop
                        _total := _total
                                || _row.table_schema || ''.''
                                || _row.table_name || ''.''
                                || _row.column_name || ''::''
                                || _row.udt_name || E''\n'';
                end loop;
                return _total;
        end;
        ';

... IOW the function does not take into account the
"staging." schema AFAICT (and intended).

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]