In DHIS 2.34, reporttables and charts were combined into a new object, “visualizations”. As part of the internal migrations, the records should have been moved to the visualizations table when you performed the upgrade from 2.33 => 2.36.4, and should still be available, as DHIS2 core should only be using the visualizations interface. Is that not the case for you?
Thanks @phil I checked in my DB with a query like below and also checked few pivot table reports through data visualization app. So it’s working as you told. Thank you
I have been trying to upgrade DHIS2 from 2.35.8 to 2.37.2 and unfortunately, it failed while performing database migrations. Take a look at the logs here.
It seems the upgrade fails because it fails to remove “Chart and ReportTable” with this I have the challenge of upgrading but also I am not sure why these tables are being dropped since they contain important visualizations that should still be in the database.
If you want to try based on my feedback, please do take backups before dropping.
Please also note: there is an analytics failure issue that exists at the moment for 2.37.1/2 so it would be great to wait for 2.37.3 if it works for your project, just my personal thought
Hello, @jthomas thanks for the response. Based on this I will definitely try dropping those tables manually.
I would also expect that this issue could be handled by flyway. I am wondering whether it should be registered as a Jira issue so when resolved anyone trying to upgrade does not need to encounter the same.
Yes please @vincentminde or @jthomas (I will tag you in the bug hunters in this month’s copmonthly :D) if you’d like to create a Jira bug issue (or I can create on your behalf)
Please include this in description as noted by @maikel and then I will ask him to follow up on the Jira issue:
SQL State : 2BP01
Error Code : 0
Message : ERROR: cannot drop table reporttable because other objects depend on it
Detail: constraint fk_dashboarditem_reporttables_reporttableid on table dashboarditem_reporttables depends on table reporttable
Hint: Use DROP ... CASCADE to drop the dependent objects too.
Location : org/hisp/dhis/db/migration/2.37/V2_37_17__Remove_Chart_and_ReportTable.sql (/home/dhis2admin/tomcat-dhis/webapps/file:/home/dhis2admin/tomcat-dhis/webapps/ROOT/WEB-INF/lib/dhis-support-db-migration-2.37.0.jar!/org/hisp/dhis/db/migration/2.37/V2_37_17__Remove_Chart_and_ReportTable.sql)
Line : 36
Statement : -- Drop all ReportTable tables
DROP TABLE IF EXISTS reporttable
and this:
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-.3.6.jar:5.3.6] ... 57 more
Caused by: org.postgresql.util.PSQLException: ERROR: cannot drop table chart because other objects depend on it
Detail: constraint fk_interpretation_chartid on table interpretation depends on table chart constraint fk_objecttranslation_chartid on table charttranslations depends on table chart
Hint: Use DROP ... CASCADE to drop the dependent objects too.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553) ~[postgresql-42.2.19.jar:42.2.19] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285) ~[postgresql-42.2.19.jar:42.2.19] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323) ~[postgresql-42.2.19.jar:42.2.19] at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481) ~[postgresql-42.2.19.jar:42.2.19]
-----------------------
I have been experiencing some issues upgrading to version 2.37. I registered a topic here. Is this something that is already fixed in this new release or is there something not right when I am upgrading?