diff --git a/addons/common/jbpm-usertask-storage-jpa/src/main/java/org/jbpm/usertask/jpa/model/AttachmentEntity.java b/addons/common/jbpm-usertask-storage-jpa/src/main/java/org/jbpm/usertask/jpa/model/AttachmentEntity.java index a0bff107682..57b6fb8f024 100644 --- a/addons/common/jbpm-usertask-storage-jpa/src/main/java/org/jbpm/usertask/jpa/model/AttachmentEntity.java +++ b/addons/common/jbpm-usertask-storage-jpa/src/main/java/org/jbpm/usertask/jpa/model/AttachmentEntity.java @@ -42,7 +42,7 @@ public class AttachmentEntity { private Date updatedAt; @ManyToOne - @JoinColumn(name = "task_id", foreignKey = @ForeignKey(name = "fk_user_task_attachment_tid")) + @JoinColumn(name = "task_id", foreignKey = @ForeignKey(name = "fk_user_tasks_attachments_tid")) private UserTaskInstanceEntity taskInstance; public String getId() { diff --git a/addons/common/jbpm-usertask-storage-jpa/src/main/java/org/jbpm/usertask/jpa/model/CommentEntity.java b/addons/common/jbpm-usertask-storage-jpa/src/main/java/org/jbpm/usertask/jpa/model/CommentEntity.java index cf70f4e7bca..83132a3c35a 100644 --- a/addons/common/jbpm-usertask-storage-jpa/src/main/java/org/jbpm/usertask/jpa/model/CommentEntity.java +++ b/addons/common/jbpm-usertask-storage-jpa/src/main/java/org/jbpm/usertask/jpa/model/CommentEntity.java @@ -40,7 +40,7 @@ public class CommentEntity { private Date updatedAt; @ManyToOne(optional = false) - @JoinColumn(name = "task_id", foreignKey = @ForeignKey(name = "fk_user_task_comment_tid")) + @JoinColumn(name = "task_id", foreignKey = @ForeignKey(name = "fk_user_tasks_comments_tid")) private UserTaskInstanceEntity taskInstance; public String getId() { diff --git a/addons/common/jbpm-usertask-storage-jpa/src/main/resources/kie-flyway/db/user-tasks/h2/V1.0.0__jBPM_user_task_create.sql b/addons/common/jbpm-usertask-storage-jpa/src/main/resources/kie-flyway/db/user-tasks/h2/V1.0.0__jBPM_user_task_create.sql index 058f3599d3b..ba5b12e5fb3 100644 --- a/addons/common/jbpm-usertask-storage-jpa/src/main/resources/kie-flyway/db/user-tasks/h2/V1.0.0__jBPM_user_task_create.sql +++ b/addons/common/jbpm-usertask-storage-jpa/src/main/resources/kie-flyway/db/user-tasks/h2/V1.0.0__jBPM_user_task_create.sql @@ -134,16 +134,16 @@ alter table if exists jbpm_user_tasks_excluded_users add constraint fk_jbpm_user_tasks_excluded_users_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade; alter table if exists jbpm_user_tasks_attachments -drop constraint if exists fk_user_task_attachment_tid cascade; +drop constraint if exists fk_user_tasks_attachments_tid cascade; alter table if exists jbpm_user_tasks_attachments -add constraint fk_user_task_attachment_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade; +add constraint fk_user_tasks_attachments_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade; alter table if exists jbpm_user_tasks_comments -drop constraint if exists fk_user_task_comment_tid cascade; +drop constraint if exists fk_user_tasks_comments_tid cascade; alter table if exists jbpm_user_tasks_comments -add constraint fk_user_task_comment_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade; +add constraint fk_user_tasks_comments_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade; alter table if exists jbpm_user_tasks_inputs drop constraint if exists fk_jbpm_user_tasks_inputs_tid cascade; diff --git a/addons/common/jbpm-usertask-storage-jpa/src/main/resources/kie-flyway/db/user-tasks/postgresql/V1.0.0__jBPM_user_task_create.sql b/addons/common/jbpm-usertask-storage-jpa/src/main/resources/kie-flyway/db/user-tasks/postgresql/V1.0.0__jBPM_user_task_create.sql index 8daa0437216..acc1ca28b0d 100644 --- a/addons/common/jbpm-usertask-storage-jpa/src/main/resources/kie-flyway/db/user-tasks/postgresql/V1.0.0__jBPM_user_task_create.sql +++ b/addons/common/jbpm-usertask-storage-jpa/src/main/resources/kie-flyway/db/user-tasks/postgresql/V1.0.0__jBPM_user_task_create.sql @@ -134,16 +134,16 @@ alter table if exists jbpm_user_tasks_excluded_users add constraint fk_jbpm_user_tasks_excluded_users_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade; alter table if exists jbpm_user_tasks_attachments -drop constraint if exists fk_user_task_attachment_tid cascade; +drop constraint if exists fk_user_tasks_attachments_tid cascade; alter table if exists jbpm_user_tasks_attachments -add constraint fk_user_task_attachment_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade; +add constraint fk_user_tasks_attachments_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade; alter table if exists jbpm_user_tasks_comments -drop constraint if exists fk_user_task_comment_tid cascade; +drop constraint if exists fk_user_tasks_comments_tid cascade; alter table if exists jbpm_user_tasks_comments -add constraint fk_user_task_comment_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade; +add constraint fk_user_tasks_comments_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade; alter table if exists jbpm_user_tasks_inputs drop constraint if exists fk_jbpm_user_tasks_inputs_tid cascade;