While migration from Camunda 7.17 to 7.20 i got this error when deleting deployments with 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
even if no schema migration is needed to migration form 7.17 to 7.20 here is the release notes https://docs.camunda.org/manual/7.18/update/minor/717-to-718/#database-updates 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
and no patch in https://docs.camunda.org/manual/latest/installation/database-schema/#update
For manual migration, I found my dabaBase scripts in :
As described in:
https://docs.camunda.org/manual/latest/installation/database-schema/#update