Database upgrade problem with Activiti moving from version 5.14 to 5.16

We are using PostgreSQL as our database and we wanted to upgrade Activiti from version 5.14 to 5.16 to be able to use the event system. Unfortunately this failed with the following problem.

org.postgresql.util.PSQLException: ERROR: constraint "act_ru_execution_proc_def_id__business_key__key" of relation "act_ru_execution" does not exist

I don’t really know what causes this. Maybe because we were still using PostgreSQL 8 until recently. Anyway, after some digging, it seems that executing the following SQL script before the update assures that the automatic database upgrade works for use.

ALTER TABLE ACT_RU_EXECUTION ADD CONSTRAINT ACT_UNIQ_RU_BUS_KEY UNIQUE(id_);
ALTER TABLE act_ru_execution ADD CONSTRAINT act_ru_execution_proc_def_id__business_key__key UNIQUE(id_);
ALTER TABLE act_hi_procinst ADD CONSTRAINT act_hi_procinst_proc_def_id__business_key__key UNIQUE(id_);

Leave a Reply

Your email address will not be published. Required fields are marked *

question razz sad evil exclaim smile redface biggrin surprised eek confused cool lol mad twisted rolleyes wink idea arrow neutral cry mrgreen

*