Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.67.x] [JBPM-10224] Missing index 'IDX_EventTypes_IdElement' with hibernate #2408

Open
wants to merge 1 commit into
base: 7.67.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@
create index IDX_TaskEvent_taskId on TaskEvent (taskId);
create index IDX_TaskEvent_processInstanceId on TaskEvent (processInstanceId);

create index IDX_EventTypes_element ON EventTypes(element);
create index IDX_EventTypes_compound ON EventTypes(InstanceId, element);
create index IDX_EventTypes_Id ON EventTypes(InstanceId);
create index IDX_EventTypes_IdElement ON EventTypes(InstanceId, element);

create index IDX_CMI_Context ON ContextMappingInfo(CONTEXT_ID);
create index IDX_CMI_KSession ON ContextMappingInfo(KSESSION_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,8 @@
create index IDX_TaskEvent_taskId on TaskEvent (taskId);
create index IDX_TaskEvent_processInstanceId on TaskEvent (processInstanceId);

create index IDX_EventTypes_element ON EventTypes(element);
create index IDX_EventTypes_compound ON EventTypes(InstanceId, element);
create index IDX_EventTypes_Id ON EventTypes(InstanceId);
create index IDX_EventTypes_IdElement ON EventTypes(InstanceId, element);

create index IDX_CMI_Context ON ContextMappingInfo(CONTEXT_ID);
create index IDX_CMI_KSession ON ContextMappingInfo(KSESSION_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,8 @@
create index IDX_TaskEvent_taskId on TaskEvent (taskId);
create index IDX_TaskEvent_processInstanceId on TaskEvent (processInstanceId);

create index IDX_EventTypes_element ON EventTypes(element);
create index IDX_EventTypes_compound ON EventTypes(InstanceId, element);
create index IDX_EventTypes_Id ON EventTypes(InstanceId);
create index IDX_EventTypes_IdElement ON EventTypes(InstanceId, element);

create index IDX_CMI_Context ON ContextMappingInfo(CONTEXT_ID);
create index IDX_CMI_KSession ON ContextMappingInfo(KSESSION_ID);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DROP INDEX IDX_EventTypes_element;
DROP INDEX IDX_EventTypes_compound;
CREATE INDEX IDX_EventTypes_IdElement ON EventTypes(InstanceId,element);
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
ALTER TABLE TimerMappingInfo ADD COLUMN processInstanceId bigint;
ALTER TABLE TimerMappingInfo MODIFY timerId bigint NULL;
ALTER TABLE TimerMappingInfo MODIFY timerId bigint NULL;
DROP INDEX IDX_EventTypes_element;
DROP INDEX IDX_EventTypes_compound;
CREATE INDEX IDX_EventTypes_IdElement ON EventTypes(InstanceId,element);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DROP INDEX IDX_EventTypes_element;
DROP INDEX IDX_EventTypes_compound;
CREATE INDEX IDX_EventTypes_IdElement ON EventTypes(InstanceId,element);
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
ALTER TABLE TimerMappingInfo ADD COLUMN processInstanceId bigint;
ALTER TABLE TimerMappingInfo MODIFY timerId bigint NULL;
ALTER TABLE TimerMappingInfo MODIFY timerId bigint NULL;
DROP INDEX IDX_EventTypes_element;
DROP INDEX IDX_EventTypes_compound;
CREATE INDEX IDX_EventTypes_IdElement ON EventTypes(InstanceId,element);
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class ProcessInstanceInfo implements PersistentProcessInstance {
@ElementCollection
@CollectionTable(name="EventTypes", joinColumns=@JoinColumn(name="InstanceId"),
indexes = {@Index(name = "IDX_EventTypes_Id", columnList="InstanceId"),
@Index(name = "IDX_EventTypes_element", columnList="element")})
@Index(name = "IDX_EventTypes_IdElement", columnList="InstanceId, element")})

@Column(name="element")
private Set<String> eventTypes = new HashSet<String>();
Expand Down