← Back to team overview

dhis2-devs team mailing list archive

Re: Error in adding a relationship with tracker capture app

 

That did not work, but this did

ALTER TABLE relationship DROP COLUMN patientaid;
ALTER TABLE relationship DROP COLUMN patientbid;

Does this point to potentially other problems, perhaps like a missed
upgrade script or problems with the startup routines which alter the tables?

Regards,
Jason




On Thu, Jun 25, 2015 at 3:32 PM, Abyot Gizaw <abyota@xxxxxxxxx> wrote:

> Yes the upgrade script was supposed to take care of that. Try to manually
> clear and see if the error goed.
>
> See here
> https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/rename-patient-to-trackedentity.sql
>
> -- relationship
>
> ALTER TABLE relationship RENAME COLUMN patientaid TO trackedentityinstanceaid;ALTER TABLE relationship RENAME COLUMN patientbid TO trackedentityinstancebid;ALTER TABLE relationship RENAME CONSTRAINT fk_relationship_patientida TO fk_relationship_trackedentityinstanceida;ALTER TABLE relationship RENAME CONSTRAINT fk_relationship_patientidb TO fk_relationship_trackedentityinstanceidb;
>
>
>
>
>
> On Thu, Jun 25, 2015 at 3:17 PM Jason Pickering <
> jason.p.pickering@xxxxxxxxx> wrote:
>
>> It has been upgraded from and earlier version. Maybe this needs to be
>> deleted or missing in an upgrade script?
>>
>> On Thu, Jun 25, 2015, 15:12 Abyot Gizaw <abyota@xxxxxxxxx> wrote:
>>
>>> Hi Jason,
>>>
>>> Seems a database issue... it complains about missing "patientaid". Is
>>> this really a 2.19 db?
>>>
>>> Thank you,
>>> Abyot.
>>>
>>> On Thu, Jun 25, 2015 at 12:37 PM Jason Pickering <
>>> jason.p.pickering@xxxxxxxxx> wrote:
>>>
>>>> I have posted the full stack trace here. Occurs when attempting to save
>>>> a new relationship.
>>>>
>>>> http://pastebin.com/ap1XxWea
>>>>
>>>> Version:2.19Build revision:19247
>>>> Regards,Jason
>>>>
>>>>
>>>>  _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>> --
>>> ----
>>> Thank you,
>>> Abyot
>>>
>> --
> ----
> Thank you,
> Abyot
>



-- 
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049

References