After upgrading from APM 10.1 to APM 10.5.x, the installation fails and the Install\SchemaTools.log file contains ERROR:
[INFO] [main] [com.wily.apm.dbutil.SqlExecutor] Executed sql statement in file: dbupgrade-apm-oracle-10.1.0.0.sql
[INFO] [main] [com.wily.apm.dbutil.SqlExecutor] Running sql statement: ALTER TABLE appmap_vertices DROP (search_attrib1, search_attrib2, search_attrib3, search_attrib4, search_attrib5, application_id)
[ERROR] [main] [com.wily.apm.dbutil.SqlExecutor] Sql error in file: dbupgrade-apm-oracle-10.1.0.0.sql
[ERROR] [main] [com.wily.apm.dbutil.SqlExecutor] java.sql.SQLException: ORA-02429: cannot drop index used for enforcement of unique/primary key
The APM 10.1 APPMAP_VERTICES table contains an additional index APPMAP_VERTICES_ATTRIB_LOOKUP which contains 2 columns vertex_id, start_time which are in the primary key of the table.
That index is not explicitly dropped in script dbupgrade-apm-oracle-10.1.0.0.sql. However the "ALTER TABLE appmap_vertices" statement to drop the columns is implicitly trying to drop the index but is failing because of the primary key dependency.
To be able to drop the index requires the APPMAP_VERTICES table primary key constraint to be temporarily disabled.