Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1276039 - Postgres upgrade script (bpms-6.0-to-6.1.sql): null value in
column "id" violates not-null constraint - added fixes + test for postgres and oracle
- Loading branch information
Showing
8 changed files
with
484 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 40 additions & 40 deletions
80
jbpm-installer/db/upgrade-scripts/oracle/jbpm-6.1-to-6.2.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
alter table SessionInfo modify ( id number(19,0) ); | ||
alter table AuditTaskImpl modify ( processSessionId number(19,0) ); | ||
alter table AuditTaskImpl modify ( activationTime timestamp ); | ||
alter table AuditTaskImpl modify ( createdOn timestamp ); | ||
alter table AuditTaskImpl modify ( dueDate timestamp ); | ||
alter table ContextMappingInfo modify ( KSESSION_ID number(19,0) ); | ||
alter table Task modify ( processSessionId number(19,0) ); | ||
|
||
create table DeploymentStore ( | ||
id number(19,0) not null, | ||
attributes varchar2(255 char), | ||
DEPLOYMENT_ID varchar2(255 char), | ||
deploymentUnit clob, | ||
state number(10,0), | ||
updateDate timestamp, | ||
primary key (id) | ||
); | ||
alter table DeploymentStore add constraint UK_DeploymentStore_1 unique (DEPLOYMENT_ID); | ||
create sequence DEPLOY_STORE_ID_SEQ; | ||
|
||
alter table ProcessInstanceLog add processInstanceDescription varchar2(255 char); | ||
alter table RequestInfo add owner varchar2(255 char); | ||
alter table Task add ( | ||
description varchar2(255 char), | ||
name varchar2(255 char), | ||
subject varchar2(255 char) | ||
); | ||
|
||
-- update all tasks with its name, subject and description | ||
update Task t set name = (select shortText from I18NText where Task_Names_Id = t.id); | ||
update Task t set subject = (select shortText from I18NText where Task_Subjects_Id = t.id); | ||
update Task t set description = (select shortText from I18NText where Task_Descriptions_Id = t.id); | ||
|
||
INSERT INTO AuditTaskImpl (activationTime, actualOwner, createdBy, createdOn, deploymentId, description, dueDate, name, parentId, priority, processId, processInstanceId, processSessionId, status, taskId) | ||
SELECT activationTime, actualOwner_id, createdBy_id, createdOn, deploymentId, description, expirationTime, name, parentId, priority,processId, processInstanceId, processSessionId, status, id | ||
FROM Task; | ||
|
||
alter table TaskEvent add workItemId number(19,0); | ||
alter table TaskEvent add processInstanceId number(19,0); | ||
update TaskEvent t set workItemId = (select workItemId from Task where id = t.taskId); | ||
alter table SessionInfo modify ( id number(19,0) ); | ||
alter table AuditTaskImpl modify ( processSessionId number(19,0) ); | ||
alter table AuditTaskImpl modify ( activationTime timestamp ); | ||
alter table AuditTaskImpl modify ( createdOn timestamp ); | ||
alter table AuditTaskImpl modify ( dueDate timestamp ); | ||
alter table ContextMappingInfo modify ( KSESSION_ID number(19,0) ); | ||
alter table Task modify ( processSessionId number(19,0) ); | ||
create table DeploymentStore ( | ||
id number(19,0) not null, | ||
attributes varchar2(255 char), | ||
DEPLOYMENT_ID varchar2(255 char), | ||
deploymentUnit clob, | ||
state number(10,0), | ||
updateDate timestamp, | ||
primary key (id) | ||
); | ||
alter table DeploymentStore add constraint UK_DeploymentStore_1 unique (DEPLOYMENT_ID); | ||
create sequence DEPLOY_STORE_ID_SEQ; | ||
alter table ProcessInstanceLog add processInstanceDescription varchar2(255 char); | ||
alter table RequestInfo add owner varchar2(255 char); | ||
alter table Task add ( | ||
description varchar2(255 char), | ||
name varchar2(255 char), | ||
subject varchar2(255 char) | ||
); | ||
-- update all tasks with its name, subject and description | ||
update Task t set name = (select shortText from I18NText where Task_Names_Id = t.id); | ||
update Task t set subject = (select shortText from I18NText where Task_Subjects_Id = t.id); | ||
update Task t set description = (select shortText from I18NText where Task_Descriptions_Id = t.id); | ||
INSERT INTO AuditTaskImpl (id, activationTime, actualOwner, createdBy, createdOn, deploymentId, description, dueDate, name, parentId, priority, processId, processInstanceId, processSessionId, status, taskId) | ||
SELECT AUDIT_ID_SEQ.nextval, activationTime, actualOwner_id, createdBy_id, createdOn, deploymentId, description, expirationTime, name, parentId, priority,processId, processInstanceId, processSessionId, status, id | ||
FROM Task; | ||
alter table TaskEvent add workItemId number(19,0); | ||
alter table TaskEvent add processInstanceId number(19,0); | ||
update TaskEvent t set workItemId = (select workItemId from Task where id = t.taskId); | ||
update TaskEvent t set processInstanceId = (select processInstanceId from Task where id = t.taskId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.