Cat Combo deletion issue

Dear All,

I’m trying to delete some Cat Combos.

I went through the api and attempted a delete of the Cat Option Combos for the Cat Combo and was returned an error saying the deletion couldn’t proceed because of an association with the dataelementoperand table.

So, I have several rows in dataelementoperand table preventing me from deleting several catoptioncombos. Now, these rows seems to be orphans, because they have no children in the following tables: datadimensionitem, datasetoperands, sectiongreyedfields.

Is that correct? Should I delete these manually via SQL?

Many thanks,

Blake

···

Blake Hansen
DHIS 2 Analyst, BAO Systems

+1 202-536-1541 | bhansen@baosystems.com | http://www.baosystems.com |

Skype: blake.a.hansen | 2900 K Street, Suite 404, Washington D.C. 20007

Hi Blake,

could you please try to delete these dataelementoperands with SQL and see if you get any complaints from PostgreSQL constraints?

If not they are orphans - we need to look for places where these are not cleaned up. If you get complaints, please let us know from which constraints/tables.

regards,

Lars

image

image

···

On Thu, Jun 9, 2016 at 6:53 PM, Blake Hansen bhansen@baosystems.com wrote:

Dear All,

I’m trying to delete some Cat Combos.

I went through the api and attempted a delete of the Cat Option Combos for the Cat Combo and was returned an error saying the deletion couldn’t proceed because of an association with the dataelementoperand table.

So, I have several rows in dataelementoperand table preventing me from deleting several catoptioncombos. Now, these rows seems to be orphans, because they have no children in the following tables: datadimensionitem, datasetoperands, sectiongreyedfields.

Is that correct? Should I delete these manually via SQL?

Many thanks,


Blake Hansen
DHIS 2 Analyst, BAO Systems

+1 202-536-1541 | bhansen@baosystems.com | http://www.baosystems.com |

Skype: blake.a.hansen | 2900 K Street, Suite 404, Washington D.C. 20007

Blake


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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Hi Lars,

Many thanks. The delete worked without complaint and it seems these are orphans.

Regards,

···

Blake Hansen
DHIS 2 Analyst, BAO Systems

+1 202-536-1541 | bhansen@baosystems.com | http://www.baosystems.com |

Skype: blake.a.hansen | 2900 K Street, Suite 404, Washington D.C. 20007

On Thu, Jun 9, 2016 at 6:53 PM, Blake Hansen bhansen@baosystems.com wrote:

Dear All,

I’m trying to delete some Cat Combos.

I went through the api and attempted a delete of the Cat Option Combos for the Cat Combo and was returned an error saying the deletion couldn’t proceed because of an association with the dataelementoperand table.

So, I have several rows in dataelementoperand table preventing me from deleting several catoptioncombos. Now, these rows seems to be orphans, because they have no children in the following tables: datadimensionitem, datasetoperands, sectiongreyedfields.

<Screen Shot 2016-06-09 at 9.38.25 AM.png>

Is that correct? Should I delete these manually via SQL?

Many thanks,


Blake Hansen
DHIS 2 Analyst, BAO Systems

+1 202-536-1541 | bhansen@baosystems.com | http://www.baosystems.com |

Skype: blake.a.hansen | 2900 K Street, Suite 404, Washington D.C. 20007

<logo.png>

Blake


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

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org

Okay. Please let us know if these are orphans are coming back, and if you have a feel for which system operation they come from.

regards,

Lars

image

···

On Fri, Jun 10, 2016 at 6:35 PM, Blake Hansen bhansen@baosystems.com wrote:

Hi Lars,

Many thanks. The delete worked without complaint and it seems these are orphans.

Regards,


Blake Hansen
DHIS 2 Analyst, BAO Systems

+1 202-536-1541 | bhansen@baosystems.com | http://www.baosystems.com |

Skype: blake.a.hansen | 2900 K Street, Suite 404, Washington D.C. 20007

On 9 Jun 2016, at 18:48, Lars Helge Øverland lars@dhis2.org wrote:

Hi Blake,

could you please try to delete these dataelementoperands with SQL and see if you get any complaints from PostgreSQL constraints?

If not they are orphans - we need to look for places where these are not cleaned up. If you get complaints, please let us know from which constraints/tables.

regards,

Lars

On Thu, Jun 9, 2016 at 6:53 PM, Blake Hansen bhansen@baosystems.com wrote:

Dear All,

I’m trying to delete some Cat Combos.

I went through the api and attempted a delete of the Cat Option Combos for the Cat Combo and was returned an error saying the deletion couldn’t proceed because of an association with the dataelementoperand table.

So, I have several rows in dataelementoperand table preventing me from deleting several catoptioncombos. Now, these rows seems to be orphans, because they have no children in the following tables: datadimensionitem, datasetoperands, sectiongreyedfields.

<Screen Shot 2016-06-09 at 9.38.25 AM.png>

Is that correct? Should I delete these manually via SQL?

Many thanks,


Blake Hansen
DHIS 2 Analyst, BAO Systems

+1 202-536-1541 | bhansen@baosystems.com | http://www.baosystems.com |

Skype: blake.a.hansen | 2900 K Street, Suite 404, Washington D.C. 20007

<logo.png>

Blake


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


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