Camunda 从 7.17 迁移到 7.20 架构错误

Camunda migration from 7.17 to 7.20 schema error

提问人:Lho Ben 提问时间:10/19/2023 更新时间:11/1/2023 访问量:108

问:

从 Camunda 7.17 迁移到 7.20 时 使用 Cascade 删除部署时出现此错误。

Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: column res.last_updated_ does not exist
  Position : 400
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Task.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.selectTaskByQueryCriteria-Inline
### The error occurred while setting parameters
### SQL: select distinct           RES.REV_, RES.ID_, RES.NAME_, RES.PARENT_TASK_ID_, RES.DESCRIPTION_, RES.PRIORITY_,     RES.CREATE_TIME_, RES.OWNER_, RES.ASSIGNEE_, RES.DELEGATION_, RES.EXECUTION_ID_,     RES.PROC_INST_ID_, RES.PROC_DEF_ID_, RES.CASE_EXECUTION_ID_, RES.CASE_INST_ID_,     RES.CASE_DEF_ID_, RES.TASK_DEF_KEY_, RES.DUE_DATE_, RES.FOLLOW_UP_DATE_,     RES.SUSPENSION_STATE_, RES.TENANT_ID_, RES.LAST_UPDATED_                                           from ACT_RU_TASK RES                                                                                                                                                                                   WHERE  (         1 = 1 and            RES.PROC_INST_ID_ = ?         )          order by RES.ID_ asc     LIMIT ? OFFSET ?
### Cause: org.postgresql.util.PSQLException: ERROR: column res.last_updated_ does not exist
  Position : 400
    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
    at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.lambda$executeSelectList$1(DbSqlSession.java:112)
    at org.camunda.bpm.engine.impl.util.ExceptionUtil.doWithExceptionWrapper(ExceptionUtil.java:350)
    ... 114 more
Caused by: org.postgresql.util.PSQLException: ERROR: column res.last_updated_ does not exist
  Position : 400

即使不需要架构迁移即可将表单 7.17 迁移到 7.20 以下是 https://docs.camunda.org/manual/7.19/update/minor/718-to-719/#database-updates https://docs.camunda.org/manual/7.20/update/minor/719-to-720/#database-updates https://docs.camunda.org/manual/7.18/update/minor/717-to-718/#database-updates 发行说明

而不是在 https://docs.camunda.org/manual/latest/installation/database-schema/#update 中打补丁

卡蒙达

评论


答:

2赞 Lho Ben 10/19/2023 #1

对于手动迁移,我在以下位置找到了我的 dabaBase 脚本:

https://artifacts.camunda.com/ui/native/camunda-bpm/org/camunda/bpm/distro/camunda-sql-scripts/7.18.0/

如上所述:

https://docs.camunda.org/manual/latest/installation/database-schema/#update

0赞 Jan Rohwer 11/1/2023 #2

实际上,该列是由从 7.17 到 7.18 的迁移脚本添加的。 有关 H2 数据库 https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/h2_engine_7.17_to_7.18.sql,请参阅此处