Summary
When upgrading to Crowd 3.3, ORA-02429 errors will be thrown when indexes cannot be removed.
Steps to Reproduce
- Install Crowd 3.2, using an Oracle DB
- Attempt to Upgrade to Crowd 3.3 using the Automatic Database Upgrade process
Expected Outcome
Crowd will upgrade to 3.3
Observed Outcome
An error will be thrown when an index cannot be dropped:
Caused by: Error : 2429, Position : 21, Sql = DROP INDEX CROWDUSER.idx_expirable_user_token_key, OriginalSql = DROP INDEX CROWDUSER.idx_expirable_user_token_key, Error Msg = ORA-02429: cannot drop index used for enforcement of unique/primary key
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
Workaround
- Shut down Crowd
- There are 2 indexes that will throw an error during the upgrade, so we'll manually remove them:
ALTER TABLE CWD_EXPIRABLE_USER_TOKEN DROP CONSTRAINT UK_EXPIRABLE_USER_TOKEN; ALTER TABLE CWD_WEBHOOK DROP CONSTRAINT UK_WEBHOOK_URL_APP;
- Commit the change (if needed)
- Start the new Crowd, and the upgrade should now complete