-
Bug
-
Resolution: Done
-
Critical
-
6.1.0
-
None
In database upgrade scripts, which are located in jbpm-installer module, we update data type of primary key column "id" of "SessionInfo" table. It's script jbpm-6.1-to-6.2.sql. Some database systems can do this update, but some others not.
E.g. in SQL Server you must first drop the primary key constraint from the column and after data type change, create it again. But the constraint can be dropped only if there are no foreign key references referencing the column. So when there is a lot of data, this can be a problem.
I'm creating this because I cannot find a "clear" solution for this case. An idea was to disable constraints temporarily, drop primary key constraint, make the data type change, enable constraints. But this can be risky, because when something fails, constraints can remain disabled.
Tested databases where it fails:
SQL Server 2012
DB2 10.1
Reproducer:
Set up appropriate Maven properties so some failing database system is used.
Run UpdateScriptsTest.testExecutingScripts() method from this PR:
https://github.com/droolsjbpm/jbpm/pull/304
- is blocked by
-
RHBPMS-1330 Add database upgrade scripts to BPMS distribution
- Verified