-
Bug
-
Resolution: Done
-
Major
-
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
- clones
-
JBPM-4768 SQL upgrade scripts - changing SessionInfo primary key column data type fails
- Open
- is blocked by
-
RHBPMS-4272 Database upgrade scripts contain Java comments (//).
- Verified