Upgrade 2.22 to 2.24 - SQL to run

Hello,
We’re upgrading a 2.22 instance to 2.24.

Looking at the release notes, 2.23 has a SQL to run for ProgramIndicators (which we don’t have) but 2.24 warns about setting some columns as “not null” and that those should be filled by the 2.23. To avoid installing each version in turn, is there any way to find the SQL that are run by the 2.23 to fill those column, so I can just run them on my 2.22 based DB & have the 2.24 run directly ?

I tried to have a look in the source code with could not find the initial SQLs.

Thanks !

Martin

···

**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com

Hi Martin,

going directly from 2.22 → 2.24 should in theory be fine, as we retain all the update statements in the source code. Look for TableAlteror.java.

Could you paste the actual SQL errors you get during update? I am sure we can work around this without upgrading to each instance.

regards,

Lars

···

On Tue, Mar 28, 2017 at 8:40 AM, Martin Van Aken martin@joyouscoding.com wrote:

Hello,
We’re upgrading a 2.22 instance to 2.24.

Looking at the release notes, 2.23 has a SQL to run for ProgramIndicators (which we don’t have) but 2.24 warns about setting some columns as “not null” and that those should be filled by the 2.23. To avoid installing each version in turn, is there any way to find the SQL that are run by the 2.23 to fill those column, so I can just run them on my 2.22 based DB & have the 2.24 run directly ?

I tried to have a look in the source code with could not find the initial SQLs.

Thanks !

Martin


**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com


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

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

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

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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Hi,
Thanks a lot for the quick answer. On server start (2.24 server on a 2.22 DB) I get errors such as: “cannot run ALTER TABLE table XXX contains null values”.

Martin

···

On Tue, Mar 28, 2017 at 3:06 PM, Lars Helge Øverland lars@dhis2.org wrote:

Hi Martin,

going directly from 2.22 → 2.24 should in theory be fine, as we retain all the update statements in the source code. Look for TableAlteror.java.

Could you paste the actual SQL errors you get during update? I am sure we can work around this without upgrading to each instance.

regards,

Lars

On Tue, Mar 28, 2017 at 8:40 AM, Martin Van Aken martin@joyouscoding.com wrote:

Hello,
We’re upgrading a 2.22 instance to 2.24.

Looking at the release notes, 2.23 has a SQL to run for ProgramIndicators (which we don’t have) but 2.24 warns about setting some columns as “not null” and that those should be filled by the 2.23. To avoid installing each version in turn, is there any way to find the SQL that are run by the 2.23 to fill those column, so I can just run them on my 2.22 based DB & have the 2.24 run directly ?

I tried to have a look in the source code with could not find the initial SQLs.

Thanks !

Martin


**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com


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

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

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

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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com

Okay. Which ones - could you paste the exact errors?

···

On Tue, Mar 28, 2017 at 9:12 AM, Martin Van Aken martin@joyouscoding.com wrote:

Hi,
Thanks a lot for the quick answer. On server start (2.24 server on a 2.22 DB) I get errors such as: “cannot run ALTER TABLE table XXX contains null values”.

From my understanding of the release notes, looks like 2.23 was creating/populating some columns and 2.24 putting them as not null, correct ?

Martin

On Tue, Mar 28, 2017 at 3:06 PM, Lars Helge Øverland lars@dhis2.org wrote:

Hi Martin,

going directly from 2.22 → 2.24 should in theory be fine, as we retain all the update statements in the source code. Look for TableAlteror.java.

Could you paste the actual SQL errors you get during update? I am sure we can work around this without upgrading to each instance.

regards,

Lars


**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com

On Tue, Mar 28, 2017 at 8:40 AM, Martin Van Aken martin@joyouscoding.com wrote:

Hello,
We’re upgrading a 2.22 instance to 2.24.

Looking at the release notes, 2.23 has a SQL to run for ProgramIndicators (which we don’t have) but 2.24 warns about setting some columns as “not null” and that those should be filled by the 2.23. To avoid installing each version in turn, is there any way to find the SQL that are run by the 2.23 to fill those column, so I can just run them on my 2.22 based DB & have the 2.24 run directly ?

I tried to have a look in the source code with could not find the initial SQLs.

Thanks !

Martin


**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com


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

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

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

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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

That was from memory, hence the lack of details, sorry for that. I’ll get my 2.24 instance back and send you the exact messages.

Regards,

Martin

···

On Tue, Mar 28, 2017 at 3:12 PM, Lars Helge Øverland lars@dhis2.org wrote:

Okay. Which ones - could you paste the exact errors?

On Tue, Mar 28, 2017 at 9:12 AM, Martin Van Aken martin@joyouscoding.com wrote:

Hi,
Thanks a lot for the quick answer. On server start (2.24 server on a 2.22 DB) I get errors such as: “cannot run ALTER TABLE table XXX contains null values”.

From my understanding of the release notes, looks like 2.23 was creating/populating some columns and 2.24 putting them as not null, correct ?

Martin


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

On Tue, Mar 28, 2017 at 3:06 PM, Lars Helge Øverland lars@dhis2.org wrote:

Hi Martin,

going directly from 2.22 → 2.24 should in theory be fine, as we retain all the update statements in the source code. Look for TableAlteror.java.

Could you paste the actual SQL errors you get during update? I am sure we can work around this without upgrading to each instance.

regards,

Lars


**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com

On Tue, Mar 28, 2017 at 8:40 AM, Martin Van Aken martin@joyouscoding.com wrote:

Hello,
We’re upgrading a 2.22 instance to 2.24.

Looking at the release notes, 2.23 has a SQL to run for ProgramIndicators (which we don’t have) but 2.24 warns about setting some columns as “not null” and that those should be filled by the 2.23. To avoid installing each version in turn, is there any way to find the SQL that are run by the 2.23 to fill those column, so I can just run them on my 2.22 based DB & have the 2.24 run directly ?

I tried to have a look in the source code with could not find the initial SQLs.

Thanks !

Martin


**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com


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

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

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

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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com

OK thanks.

···

On Tue, Mar 28, 2017 at 9:30 AM, Martin Van Aken martin@joyouscoding.com wrote:

That was from memory, hence the lack of details, sorry for that. I’ll get my 2.24 instance back and send you the exact messages.

Regards,

Martin

On Tue, Mar 28, 2017 at 3:12 PM, Lars Helge Øverland lars@dhis2.org wrote:

Okay. Which ones - could you paste the exact errors?


**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com

On Tue, Mar 28, 2017 at 9:12 AM, Martin Van Aken martin@joyouscoding.com wrote:

Hi,
Thanks a lot for the quick answer. On server start (2.24 server on a 2.22 DB) I get errors such as: “cannot run ALTER TABLE table XXX contains null values”.

From my understanding of the release notes, looks like 2.23 was creating/populating some columns and 2.24 putting them as not null, correct ?

Martin


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

On Tue, Mar 28, 2017 at 3:06 PM, Lars Helge Øverland lars@dhis2.org wrote:

Hi Martin,

going directly from 2.22 → 2.24 should in theory be fine, as we retain all the update statements in the source code. Look for TableAlteror.java.

Could you paste the actual SQL errors you get during update? I am sure we can work around this without upgrading to each instance.

regards,

Lars


**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com

On Tue, Mar 28, 2017 at 8:40 AM, Martin Van Aken martin@joyouscoding.com wrote:

Hello,
We’re upgrading a 2.22 instance to 2.24.

Looking at the release notes, 2.23 has a SQL to run for ProgramIndicators (which we don’t have) but 2.24 warns about setting some columns as “not null” and that those should be filled by the 2.23. To avoid installing each version in turn, is there any way to find the SQL that are run by the 2.23 to fill those column, so I can just run them on my 2.22 based DB & have the 2.24 run directly ?

I tried to have a look in the source code with could not find the initial SQLs.

Thanks !

Martin


**Martin Van Aken - **Freelance Enthusiast Developer

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken

Call me on Skype : vanakenm

Hang out with me : martin@joyouscoding.com

Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken

Company website : www.joyouscoding.com


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

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

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

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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org