Migration to sonarqube 6.7.4 - oracle db error ORA-02429

Hi,

I started this sonarqube migration: 5.4 -> 5.6.7 LTS -> 6.7.4 LTS -> 7.2.1
Our Sonarqube is connected to an Oracle 12 database

Upgrading from 5.6.7 to 6.7.4 gave me these error messages:

ERROR web[][DbMigrations] #1231 ‘Drop columns PROJECTS._ID’: failure | time=13ms
ERROR web[][DbMigrations] Executed DB migrations: failure | time=9150ms
ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=9250ms
ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration ended with an exception
org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #1231 'Drop columns PROJECTS.
_ID’ failed
Caused by: java.lang.IllegalStateException: Fail to execute ALTER TABLE projects SET UNUSED (root_id, copy_resource_id, person_id)
Caused by: java.sql.SQLException: ORA-02429: cannot drop index used for enforcement of unique/primary key

Looking at the projects table (primary key: id), there is 1 index named “PROJECTS_FL7” on these 4 columns: id, root_id, copy_resource_id, person_id
So I guess it is this index “PROJECTS_FL7” that could not be dropped because of the primary key column “id”.
Do use recommend to drop this index manually or what can I do to finish the migration ?

Regards,

Serge

Hi Serge,

I have no idea why an index on multiple columns includes the primary key “id”. Could it be an old manual addition on your side ?
Anyway the index should be manually dropped before upgrading to 6.7.

Regards