2.29 upgrade script error

Dear All,

I am trying to migrate from 2.28 (aff610f) to 2.29, by first running the upgrade script and then updating the .war file.

However I am stuck at the upgrade script with this error:

Please advise.

All the best,

Bernard

cid:image002.png@01D36F50.572585A0

Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail: lib.ima@pu-ami.org

Cell: +961 71 004 881 (208)

Skype: imapuami

Website: https://www.pu-ami.org


Virus-free. www.avast.com

Hi there Bernard,
that was strange - your 2.28 database should have contained the table userroleprogram.
Assuming you are running 2.28, can you try running this query on your command line?
\dt userrole*
Expecting that one of the lines output is:
public | userroleprogram | table | dhis

Best regards,
Markus

···

9. mar. 2018 kl. 10:04 skrev Bernard Sadaka (IM Advisor) <lib.ima@pu-ami.org>:

Dear All,
I am trying to migrate from 2.28 (aff610f) to 2.29, by first running the upgrade script and then updating the .war file.
However I am stuck at the upgrade script with this error:
<image001.png>
Please advise.

All the best,
Bernard

<image002.png>
Bernard Sadaka
Information Management Advisor
Première Urgence - Aide Médicale Internationale
Nehmeh Building, Sanine Street, Chiyah, 3rd Floor
Ain el Remmaneh, Beirut, Lebanon
E-mail: lib.ima@pu-ami.org <mailto:lib.ima@pu-ami.org>
Cell: +961 71 004 881 (208)
Skype: imapuami
Website: https://www.pu-ami.org <https://www.pu-ami.org/&gt;

<Safe emailing Mac | Avast; Virus-free. www.avast.com <Safe emailing Mac | Avast; <x-msg://58/#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net <mailto:dhis2-devs@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

Hi Dan!
You are are absolutely right. The script currently triggers a migration of data into the programstageusergroupaccesses before this table is created.

To get around the problem right away you need to run the script except for the last line, then start the server, and run the last line of the script to do the migration:
select migrateRoleToUserGroup();

Looking at a better fix now - to migrate as part of the server startup.

Markus

P.S. This does not look like the same problem that Bernard had for some reason - but expecting that Bernard need to do the same workaround.

···

9. mar. 2018 kl. 13:39 skrev Dan Cocos <dcocos@gmail.com>:

We’ve run into a similar problem when testing from 2.28 to 2.29

psql:/tmp/229-upgrade.sql:117: ERROR: relation "programstageusergroupaccesses" does not exist
LINE 1: insert into programstageusergroupaccesses ( programid, userg…

When looked deeper into it, that table did not exist. Is it possible these tables don’t exist or weren’t migrated from a previous upgrade if one isn’t using Tracker?

Thanks,
Dan

Dan Cocos
Principal, BAO Systems
dcocos@baosystems.com <mailto:dcocos@baosystems.com> | http://www.baosystems.com <http://www.baosystems.com/&gt; | 2900 K Street, Suite 406, Washington D.C. 20007

On Mar 9, 2018, at 7:31 AM, Markus Bekken <markus@dhis2.org <mailto:markus@dhis2.org>> wrote:

Hi there Bernard,
that was strange - your 2.28 database should have contained the table userroleprogram.
Assuming you are running 2.28, can you try running this query on your command line?
\dt userrole*
Expecting that one of the lines output is:
public | userroleprogram | table | dhis

Best regards,
Markus

9. mar. 2018 kl. 10:04 skrev Bernard Sadaka (IM Advisor) <lib.ima@pu-ami.org <mailto:lib.ima@pu-ami.org>>:

Dear All,
I am trying to migrate from 2.28 (aff610f) to 2.29, by first running the upgrade script and then updating the .war file.
However I am stuck at the upgrade script with this error:
<image001.png>
Please advise.

All the best,
Bernard

<image002.png>
Bernard Sadaka
Information Management Advisor
Première Urgence - Aide Médicale Internationale
Nehmeh Building, Sanine Street, Chiyah, 3rd Floor
Ain el Remmaneh, Beirut, Lebanon
E-mail: lib.ima@pu-ami.org <mailto:lib.ima@pu-ami.org>
Cell: +961 71 004 881 (208)
Skype: imapuami
Website: https://www.pu-ami.org <https://www.pu-ami.org/&gt;

<Safe emailing Mac | Avast; Virus-free. www.avast.com <Safe emailing Mac | Avast; <x-msg://58/#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net <mailto:dhis2-devs@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net <mailto:dhis2-devs@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

Hello Markus,

Unfortunately I don’t have that table:

dhisdb=# \dt userrole*

             List of relations

Schema | Name | Type | Owner

image

image

···

--------±--------------------------±------±------

public | userrole | table | dhis

public | userroleauthorities | table | dhis

public | userroledataset | table | dhis

public | userrolemembers | table | dhis

public | userroletranslations | table | dhis

public | userroleuseraccesses | table | dhis

public | userroleusergroupaccesses | table | dhis

(7 rows)

Is there any maintenance scripts I need to run in order to create that table?

All the best,

Bernard

cid:image002.png@01D36F50.572585A0

Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail: lib.ima@pu-ami.org

Cell: +961 71 004 881 (208)

Skype: imapuami

Website: https://www.pu-ami.org

From: Markus Bekken [mailto:markus@dhis2.org]
Sent: Friday, March 9, 2018 2:32 PM
To: Bernard Sadaka (IM Advisor) lib.ima@pu-ami.org
Cc: dhis2-users@lists.launchpad.net; DHIS 2 Developers list dhis2-devs@lists.launchpad.net
Subject: Re: [Dhis2-devs] 2.29 upgrade script error

Hi there Bernard,

that was strange - your 2.28 database should have contained the table userroleprogram.

Assuming you are running 2.28, can you try running this query on your command line?

\dt userrole*

Expecting that one of the lines output is:

public | userroleprogram | table | dhis

Best regards,

Markus

  1. mar. 2018 kl. 10:04 skrev Bernard Sadaka (IM Advisor) lib.ima@pu-ami.org:

Dear All,

I am trying to migrate from 2.28 (aff610f) to 2.29, by first running the upgrade script and then updating the .war file.

However I am stuck at the upgrade script with this error:

<image001.png>

Please advise.

All the best,

Bernard

<image002.png>

Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail: lib.ima@pu-ami.org

Cell: +961 71 004 881 (208)

Skype: imapuami

Website: https://www.pu-ami.org

Image removed by sender.

Virus-free. www.avast.com


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

Dear Markus,

After a closer look, I found this table:

public | program_userroles | table | dhis

Is it the same?

All the best,

Bernard

cid:image002.png@01D36F50.572585A0

Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail: lib.ima@pu-ami.org

Cell: +961 71 004 881 (208)

Skype: imapuami

Website: https://www.pu-ami.org

image

···

From: Dhis2-users [mailto:dhis2-users-bounces+lib.ima=pu-ami.org@lists.launchpad.net] On Behalf Of Bernard Sadaka (IM Advisor)
Sent: Friday, March 9, 2018 3:17 PM
To: ‘Markus Bekken’ markus@dhis2.org
Cc: dhis2-users@lists.launchpad.net; ‘DHIS 2 Developers list’ dhis2-devs@lists.launchpad.net
Subject: Re: [Dhis2-users] [Dhis2-devs] 2.29 upgrade script error

Hello Markus,

Unfortunately I don’t have that table:

dhisdb=# \dt userrole*

             List of relations

Schema | Name | Type | Owner

--------±--------------------------±------±------

public | userrole | table | dhis

public | userroleauthorities | table | dhis

public | userroledataset | table | dhis

public | userrolemembers | table | dhis

public | userroletranslations | table | dhis

public | userroleuseraccesses | table | dhis

public | userroleusergroupaccesses | table | dhis

(7 rows)

Is there any maintenance scripts I need to run in order to create that table?

All the best,

Bernard

cid:image002.png@01D36F50.572585A0

Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail: lib.ima@pu-ami.org

Cell: +961 71 004 881 (208)

Skype: imapuami

Website: https://www.pu-ami.org

From: Markus Bekken [mailto:markus@dhis2.org]
Sent: Friday, March 9, 2018 2:32 PM
To: Bernard Sadaka (IM Advisor) lib.ima@pu-ami.org
Cc: dhis2-users@lists.launchpad.net; DHIS 2 Developers list dhis2-devs@lists.launchpad.net
Subject: Re: [Dhis2-devs] 2.29 upgrade script error

Hi there Bernard,

that was strange - your 2.28 database should have contained the table userroleprogram.

Assuming you are running 2.28, can you try running this query on your command line?

\dt userrole*

Expecting that one of the lines output is:

public | userroleprogram | table | dhis

Best regards,

Markus

  1. mar. 2018 kl. 10:04 skrev Bernard Sadaka (IM Advisor) lib.ima@pu-ami.org:

Dear All,

I am trying to migrate from 2.28 (aff610f) to 2.29, by first running the upgrade script and then updating the .war file.

However I am stuck at the upgrade script with this error:

<image001.png>

Please advise.

All the best,

Bernard

<image002.png>

Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail: lib.ima@pu-ami.org

Cell: +961 71 004 881 (208)

Skype: imapuami

Website: https://www.pu-ami.org

Image removed by sender.

Virus-free. www.avast.com


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

Dear Bernard,
You are absolutely right. The program_userroles table is the correct one, and the userroleprogram table is a legacy table not used anymore. We just fixed the script, please try again with the latest version.

Best regards,
Markus

···

9. mar. 2018 kl. 14:21 skrev Bernard Sadaka (IM Advisor) <lib.ima@pu-ami.org>:

Dear Markus,
After a closer look, I found this table:
public | program_userroles | table | dhis
Is it the same?

All the best,
Bernard

<image001.png>
Bernard Sadaka
Information Management Advisor
Première Urgence - Aide Médicale Internationale
Nehmeh Building, Sanine Street, Chiyah, 3rd Floor
Ain el Remmaneh, Beirut, Lebanon
E-mail: lib.ima@pu-ami.org <mailto:lib.ima@pu-ami.org>
Cell: +961 71 004 881 (208)
Skype: imapuami
Website: https://www.pu-ami.org <https://www.pu-ami.org/&gt;

From: Dhis2-users [mailto:dhis2-users-bounces+lib.ima=pu-ami.org@lists.launchpad.net <mailto:dhis2-users-bounces+lib.ima=pu-ami.org@lists.launchpad.net>] On Behalf Of Bernard Sadaka (IM Advisor)
Sent: Friday, March 9, 2018 3:17 PM
To: 'Markus Bekken' <markus@dhis2.org <mailto:markus@dhis2.org>>
Cc: dhis2-users@lists.launchpad.net <mailto:dhis2-users@lists.launchpad.net>; 'DHIS 2 Developers list' <dhis2-devs@lists.launchpad.net <mailto:dhis2-devs@lists.launchpad.net>>
Subject: Re: [Dhis2-users] [Dhis2-devs] 2.29 upgrade script error

Hello Markus,
Unfortunately I don’t have that table:
dhisdb=# \dt userrole*
                 List of relations
Schema | Name | Type | Owner
--------+---------------------------+-------+-------
public | userrole | table | dhis
public | userroleauthorities | table | dhis
public | userroledataset | table | dhis
public | userrolemembers | table | dhis
public | userroletranslations | table | dhis
public | userroleuseraccesses | table | dhis
public | userroleusergroupaccesses | table | dhis
(7 rows)
Is there any maintenance scripts I need to run in order to create that table?

All the best,
Bernard

<image001.png>
Bernard Sadaka
Information Management Advisor
Première Urgence - Aide Médicale Internationale
Nehmeh Building, Sanine Street, Chiyah, 3rd Floor
Ain el Remmaneh, Beirut, Lebanon
E-mail: lib.ima@pu-ami.org <mailto:lib.ima@pu-ami.org>
Cell: +961 71 004 881 (208)
Skype: imapuami
Website: https://www.pu-ami.org <https://www.pu-ami.org/&gt;

From: Markus Bekken [mailto:markus@dhis2.org <mailto:markus@dhis2.org>]
Sent: Friday, March 9, 2018 2:32 PM
To: Bernard Sadaka (IM Advisor) <lib.ima@pu-ami.org <mailto:lib.ima@pu-ami.org>>
Cc: dhis2-users@lists.launchpad.net <mailto:dhis2-users@lists.launchpad.net>; DHIS 2 Developers list <dhis2-devs@lists.launchpad.net <mailto:dhis2-devs@lists.launchpad.net>>
Subject: Re: [Dhis2-devs] 2.29 upgrade script error

Hi there Bernard,
that was strange - your 2.28 database should have contained the table userroleprogram.
Assuming you are running 2.28, can you try running this query on your command line?
\dt userrole*
Expecting that one of the lines output is:
public | userroleprogram | table | dhis

Best regards,
Markus

9. mar. 2018 kl. 10:04 skrev Bernard Sadaka (IM Advisor) <lib.ima@pu-ami.org <mailto:lib.ima@pu-ami.org>>:

Dear All,
I am trying to migrate from 2.28 (aff610f) to 2.29, by first running the upgrade script and then updating the .war file.
However I am stuck at the upgrade script with this error:
<image001.png>
Please advise.

All the best,
Bernard

<image002.png>
Bernard Sadaka
Information Management Advisor
Première Urgence - Aide Médicale Internationale
Nehmeh Building, Sanine Street, Chiyah, 3rd Floor
Ain el Remmaneh, Beirut, Lebanon
E-mail: lib.ima@pu-ami.org <mailto:lib.ima@pu-ami.org>
Cell: +961 71 004 881 (208)
Skype: imapuami
Website: https://www.pu-ami.org <https://www.pu-ami.org/&gt;

<image002.jpg> <Safe emailing Mac | Avast;
Virus-free. www.avast.com <Safe emailing Mac | Avast;
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net <mailto:dhis2-devs@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp