Error in adding a relationship with tracker capture app

I have posted the full stack trace here. Occurs when attempting to save a new relationship.

http://pastebin.com/ap1XxWea

Version:
2.19
Build revision:
19247

Regards,
Jason

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@gmail.com wrote:

I have posted the full stack trace here. Occurs when attempting to save a new relationship.

http://pastebin.com/ap1XxWea

Version:
2.19
Build revision:
19247

Regards,
Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Thank you,

Abyot

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@gmail.com 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@gmail.com wrote:

I have posted the full stack trace here. Occurs when attempting to save a new relationship.

http://pastebin.com/ap1XxWea

Version:
2.19
Build revision:
19247

Regards,
Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Thank you,

Abyot

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@gmail.com 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@gmail.com 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@gmail.com wrote:

I have posted the full stack trace here. Occurs when attempting to save a new relationship.

http://pastebin.com/ap1XxWea

Version:
2.19
Build revision:
19247

Regards,
Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Thank you,

Abyot


Thank you,

Abyot

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@gmail.com 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@gmail.com 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@gmail.com 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@gmail.com wrote:

I have posted the full stack trace here. Occurs when attempting to save a new relationship.

http://pastebin.com/ap1XxWea

Version:
2.19
Build revision:
19247

Regards,
Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

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@gmail.com
tel:+46764147049

1 Like