ED2 KC- Cannot drop table color because other objects depend on it
Community of Practice
Examples
When upgrading 2.34 → 2.35
Migration V2_35_4__Remove_color_set.sql failed
----------------------------------------------
SQL State : 2BP01
Error Code : 0
Message : ERROR: cannot drop table color because other objects depend on it
Detail: constraint fk_objecttranslation_colorid on table colortranslations depends on table color
Hint: Use DROP ... CASCADE to drop the dependent objects too.
Location : org/hisp/dhis/db/migration/2.35/V2_35_4__Remove_color_set.sql (/usr/share/tomcat/file:/var/lib/tomcat/webapps/ROOT/WEB-INF/lib/dhis-support-db-migration-2.35.3.jar!/org/hisp/dhis/db/migration/2.35/V2_35_4__Remove_color_set.sql)
Line : 9
Statement : drop table if exists color at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProce
ssor.java:643)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.ja
va:399)Migration V2_35_4__Remove_color_set.sql failed
----------------------------------------------
SQL State : 2BP01
Error Code : 0
Message : ERROR: cannot drop table color because other objects depend on it
Detail: constraint fk_objecttranslation_colorid on table colortranslations depends on table color
Hint: Use DROP ... CASCADE to drop the dependent objects too.
Location : org/hisp/dhis/db/migration/2.35/V2_35_4__Remove_color_set.sql (/usr/share/tomcat/file:/var/lib/tomcat/webapps/ROOT/WEB-INF/lib/dhis-support-db-migrat
ion-2.35.3.jar!/org/hisp/dhis/db/migration/2.35/V2_35_4__Remove_color_set.sql)
Line : 9
Statement : drop table if exists color