From 291cd26f95bfb5f860ca615907758ed3337d20d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pere=20Fern=C3=A1ndez?= Date: Fri, 25 Oct 2024 16:15:47 +0200 Subject: [PATCH 1/2] [NO_ISSUE] fix constraints names --- .../org/jbpm/usertask/jpa/model/AttachmentEntity.java | 2 +- .../java/org/jbpm/usertask/jpa/model/CommentEntity.java | 2 +- .../db/user-tasks/h2/V1.0.0__jBPM_user_task_create.sql | 8 ++++---- .../postgresql/V1.0.0__jBPM_user_task_create.sql | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) 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..0c3681da9f8 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_task_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..fd6a44ffc7e 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_task_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..0394b815086 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_task_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_task_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_task_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_task_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..b0a82438df2 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_task_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_task_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_task_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_task_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; From 5f8ccccaea19256ee2276366082b38ce4cd16de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pere=20Fern=C3=A1ndez?= Date: Fri, 25 Oct 2024 16:29:42 +0200 Subject: [PATCH 2/2] - fix --- .../org/jbpm/usertask/jpa/model/AttachmentEntity.java | 2 +- .../java/org/jbpm/usertask/jpa/model/CommentEntity.java | 2 +- .../db/user-tasks/h2/V1.0.0__jBPM_user_task_create.sql | 8 ++++---- .../postgresql/V1.0.0__jBPM_user_task_create.sql | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) 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 0c3681da9f8..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_attachments_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 fd6a44ffc7e..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_comments_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 0394b815086..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_attachments_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_attachments_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_comments_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_comments_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 b0a82438df2..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_attachments_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_attachments_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_comments_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_comments_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;