May be. I don't think you can alter a table while you have views or user defined functions referring to the table.
On Thu, Jul 30, 2015 at 1:33 PM Elmarie Claasen <elma...@hisp.org> wrote: > Thanks a lot Abyot, > > > > We ran this script after deleting 2 sql views which referenced this table > as it would not run until we deleted the 2 sql views. A follow up question > –could it be that this change did not execute because of the 2 sql views? > We know that dhis2 drops sql views before running analytics but does it > check/drop sql views before making changes to tables? > > > > > > Regards, > > > > *Elmarie Claasen* > > [image: Hisp logo] > > Project Manager > > Health Information Systems Program > > Tel: 041-367 1027 > > Cell: 082 374 2209 > > E-mail: elma...@hisp.org > > Skype: elmarie.claasen52 > > > > > > This message and any attachments are subject to a disclaimer published at > http://www.hisp.org/policies.html#comms_disclaimer > . Please read the disclaimer before opening any attachment or taking any > other action in terms of this electronic transmission. > If you cannot access the disclaimer, kindly send an email to > disclai...@hisp.org > and a copy will be provided to you. By replying to this e-mail or opening > any attachment you agree to be bound by the provisions of the disclaimer. > > > > *From:* Abyot Gizaw [mailto:aby...@gmail.com] > *Sent:* 30 July 2015 12:59 PM > *To:* Elmarie Claasen; dhis2-d...@lists.launchpad.net; > dhis2-users@lists.launchpad.net > *Subject:* Re: [Dhis2-users] FW: Problem with Tracker program after > updating to 2.20 stable > > > > > > On Thu, Jul 30, 2015 at 11:30 AM Elmarie Claasen <elma...@hisp.org> wrote: > > Hi Devs, > > > > I have an urgent database issue which I have to resolve as this project is > implementing by Monday and my database is not running on 2.20 stable which > I need for the tracker capture app to load. Can someone please assist. > > > > We have a database called ISHP which Erling has been helping us to set up > the Tracker capture app for implementation. > > Since the app could only connect to 2.20 we upgraded our training database > some time ago to 2.20 snapshot build revision 19527 and also kept the > program changes we made updated in 2.19 live version since we couldn’t risk > updating a live database when we did not know what the implications would > be. > > > > We now wanting to update the 2.19 Live database to 2.20 which we did on > our development instance but get the following errors which does not allow > us to > > > > 1. access the program in the UI or via the tracker capture app (see > open program error log) The problem seems to be that the programtype in > our database is Integer while in other 2.20 instances it is char varying. > The update script from 2.19>2.20 does not contain anything changing this so > how do I deal with this please… > > > > This was supposed to be handled internally in the code. > > > > try to alter manually and see what happens > > > > ALTER TABLE program ALTER COLUMN "type" TYPE varchar(255); > > > > > > 2. analytics is failing due to fieldname error (see detailed > analytics error log attached but here is a short version) The problem is > that the temp table has a fieldname called de instead of dx – again > something I don’t know how it happens or how to fix > > > > *Caused by: org.springframework.jdbc.BadSqlGrammarException: > StatementCallback; bad SQL grammar [update analytics_temp_2015 set > "uidlevel1" = null,"uidlevel2" = null,"uidlevel3" = null,"uidlevel4" = > null,"uidlevel5" = null where level > 5 and de in ('jx6lCxe8gYy', > 'cjA6JH0kC9B')]; nested exception is org.postgresql.util.PSQLException: > ERROR: column "de" does not exist* > > We checked our other 2.20 databases and the column name is dx but we don’t > know how to fix this – please help! > > > > The program we are accessing on 2.19, 2.20 stable and 2.20 snapshot > Version: Build revision: 19527 Build date: 2015-07-01 08:47 is all set up > exactly the same way and I don’t see why one would be able to open the > program, open tracker capture in the UI and log in on tracker capture app > only on the 2.20 snapshot version and not on 2.20 stable. Can you please > assist us with what is wrong? > > > > > > Regards, > > > > *Elmarie Claasen* > > [image: Hisp logo] > > Project Manager > > Health Information Systems Program > > Tel: 041-367 1027 > > Cell: 082 374 2209 > > E-mail: elma...@hisp.org > > Skype: elmarie.claasen52 > > > > > > This message and any attachments are subject to a disclaimer published at > http://www.hisp.org/policies.html#comms_disclaimer > . Please read the disclaimer before opening any attachment or taking any > other action in terms of this electronic transmission. > If you cannot access the disclaimer, kindly send an email to > disclai...@hisp.org > and a copy will be provided to you. By replying to this e-mail or opening > any attachment you agree to be bound by the provisions of the disclaimer. > > > > > > *This message and any attachments are subject to a disclaimer published at > http://www.hisp.org/policies.html#comms_disclaimer > <http://www.hisp.org/policies.html#comms_disclaimer>. Please read the > disclaimer before opening any attachment or taking any other action in > terms of this electronic transmission. If you cannot access the > disclaimer, kindly send an email to disclai...@hisp.org > <disclai...@hisp.org> and a copy will be provided to you. By replying to > this e-mail or opening any attachment you agree to be bound by the > provisions of the disclaimer.* > > _______________________________________________ > Mailing list: https://launchpad.net/~dhis2-users > Post to : dhis2-users@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dhis2-users > More help : https://help.launchpad.net/ListHelp > > -- > > ---- > > Thank you, > > Abyot > > *This message and any attachments are subject to a disclaimer published at > http://www.hisp.org/policies.html#comms_disclaimer > <http://www.hisp.org/policies.html#comms_disclaimer>. Please read the > disclaimer before opening any attachment or taking any other action in > terms of this electronic transmission. If you cannot access the > disclaimer, kindly send an email to disclai...@hisp.org > <disclai...@hisp.org> and a copy will be provided to you. By replying to > this e-mail or opening any attachment you agree to be bound by the > provisions of the disclaimer.* > -- ---- Thank you, Abyot
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-users Post to : dhis2-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-users More help : https://help.launchpad.net/ListHelp