dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #47845
Re: Upgrade from 2.24 to 2.25 -> DataElements relationship to existing DataSets Lost
Thanks Lorill for figuring it out. It's a good point - we wrap the data set
element upgrade in a transaction so it will fail if it cannot drop the old
datasetmembers table. The issue with logging is that the built-in upgrade
scripts are supposed to fail after the very first run and so it would be
noisy to always log errors. I have added a note about the SQL views now in
the upgrade notes. Thanks for reporting.
best regards,
Lars
On Tue, Nov 22, 2016 at 1:14 AM, Lorill Crees <lcrees@xxxxxxxxxx> wrote:
> Hi Lars,
>
> I thought of one more thing to try before sending you a database - I
> hadn't dropped our custom SQL views prior to the upgrade. Dropping the
> views prior to starting up DHIS 2 fixed the issue and we can now see the
> relationships between DataSets and DataElements via DataSetElements
> preserved.
>
> By the way there wasn't any exceptions in the logs when the views were
> present, the data transformation just silently failed. We just need to be
> mindful to always drop the SQL views as part of all upgrade processes
> (which we usually do).
>
> Cheers,
>
> Lorill
>
>
>
> On Mon, Nov 21, 2016 at 3:43 PM, Lorill Crees <lcrees@xxxxxxxxxx> wrote:
>
>> Hi Lars,
>>
>> Thanks, I will follow up with you privately to share a 2.24 database.
>>
>> Thanks,
>>
>> Lorill
>>
>> On Mon, Nov 21, 2016 at 3:37 PM, Lars Helge Øverland <lars@xxxxxxxxx>
>> wrote:
>>
>>> Hi Lorill,
>>>
>>> okay no that is clearly not supposed to happen. Are you able to share
>>> privately a database dump from before the 2.25 upgrade?
>>>
>>> regards,
>>>
>>> Lars
>>>
>>>
>>> On Tue, Nov 22, 2016 at 12:25 AM, Lorill Crees <lcrees@xxxxxxxxxx>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> We are in the process of testing an upgrade from 2.24 to 2.25. We have
>>>> followed the upgrade procedures and run the upgrade sql script
>>>> <https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/upgrade-225.sql>.
>>>> We have also noted the change in relationship between DataElements and
>>>> DataSets in 2.25 with the introduction of DataSetElements as outlined in
>>>> the release notes <https://www.dhis2.org/225-upgrade>.
>>>>
>>>> However, after upgrading, all our DataElements that were previously
>>>> associated with specific DataSets are no longer related. After the upgrade
>>>> all our existing DataSets have an empty array of DataSetElements.
>>>>
>>>> Is there something else we need to do here as part of the upgrade to
>>>> ensure the DataSet / DataElements relationships are retained and
>>>> transformed properly into DataSet / DataSetElements relationships?
>>>>
>>>> Thanks,
>>>>
>>>> Lorill
>>>>
>>>> --
>>>> Lorill Crees
>>>> Project Leader / Senior Developer
>>>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>>>
>>>> lcrees@xxxxxxxxxx
>>>> skype: lorill2paths
>>>> (604) 689-4123 x 15
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> lars@xxxxxxxxx
>>> http://www.dhis2.org <https://www.dhis2.org/>
>>>
>>>
>>
>>
>> --
>> Lorill Crees
>> Project Leader / Senior Developer
>> 2Paths Solutions Ltd. <http://www.2paths.com>
>>
>> lcrees@xxxxxxxxxx
>> skype: lorill2paths
>> (604) 689-4123 x 15
>>
>
>
>
> --
> Lorill Crees
> Project Leader / Senior Developer
> 2Paths Solutions Ltd. <http://www.2paths.com>
>
> lcrees@xxxxxxxxxx
> skype: lorill2paths
> (604) 689-4123 x 15
>
--
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
lars@xxxxxxxxx
http://www.dhis2.org <https://www.dhis2.org/>
References