Cant register entities in tracker due to ERROR: permission denied for relation relationshipitem"


(Alex Tumwesigye) #1

Any one experiencing this error “Failed to save the enrollment to the server
ERROR: permission denied for relation relationshipitem” when registering in the tracker after upgrading from 2.29 to 2.30 or 2.30 to 2.31
In the github, it is indicated that this fixed but the new builds does not work either
Version:

2.31.1

Build revision:

13da2cc

Build date:

2019-02-04 14:13


(Lusanda) #2

Hi Alex ,

Try running this script against your database , this normally happens when upgrading to 2.30.

ALTER TABLE public.relationshipitem OWNER to dhis;
ALTER TABLE public.relationshipconstraint OWNER to dhis;

Cheers…

Lusanda


(James Omutsani) #3

Hi @Alex_Tumwesigye,

As the community team looks into this, our team from @dhis2-tracker will also check it out and advise.

Best,
James.


(Lusanda) #4

@ James am confident the script should fix the problem ,had the same issue after upgrading to 2.30 from 2.29 and it worked.


(James Omutsani) #5

Hi @lusandan, I had missed your comment up there… apologies; and thank you for this.
@Alex_Tumwesigye; kindly let us know if this works.

Best,
James.


(Alex Tumwesigye) #6

Yes. This worked. I had not noticed the difference in table ownership for those two tables.

Thanks


(James Omutsani) #7

Thank you for your feedback Alex.