cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti SQL for upgrading from 5.2 to 5.3...

wolpert
Champ in-the-making
Champ in-the-making
Folks-

  We use liquibase to manage our database, so I need to create a SQL script for updating from 5.2 to 5.3. For this, I'm planning on just doing the following:

1) Copy the SQL from activiti.postgres.upgradestep.52.to.53.history.sql
2) following SQL updates:
update act_ge_property set rev_ = 2, value_ = '5.3' where name_ = 'schema.version';
update act_ge_property set rev_ = 2, value_ = 'create(5.1) upgrade(5.1->5.3)' where name_ = 'schema.history';
insert into act_ge_property (name_, value_, rev_) values ('historyLevel','2',1);

(Note that the 'schema.history' I'm setting was how it was done in my developer instance.)

Is this correct? Is there a way to execute the activiti upgrade process, but have it printout the pending SQL and not execute it? Is there a better way? (I suppose I could clone my current db to a local instance, turn logging on my db to full, run the upgrade in a local instance, and manually copy the resulting SQL to a liquibase script…)
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Hi,

Indeed, eg. the file/activiti-engine/src/main/resources/org/activiti/db/upgrade/activiti.oracle.upgradestep.52.to.53.history.sql contains script that is executed when upgrading history from 5.2 to 5.3. This can also contain Java-steps (eg. execute java org.activiti.engine.impl.db.upgrade.DbUpgradeStep52To53InsertPropertyHistoryLevel).

By combining all scripts (history, engine, …) + java-steps for your DB, you can see what happens in the upgrade. Offcourse, the java-steps may contain additional logic that cannot be translated to SQL, but as long as you can translate it, this is the only way to upgrade manually (although not recommended).
There is currently no way of doing a "dry run" which just prints out the updates.