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

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

3 Likes

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

3 Likes

Hi @Alex_Tumwesigye,

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

Best,
James.

1 Like

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

2 Likes

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.

2 Likes

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

Thanks

2 Likes

Thank you for your feedback Alex.

1 Like