记录日志lowcode_log_api报错

rain

org.springframework.jdbc.BadSqlGrammarException: 

### Error updating database.  Cause: org.postgresql.util.PSQLException: 错误: 字段 "tenant_id" 的类型为 bigint, 但表达式的类型为 character varying

  建议:你需要重写或转换表达式

  位置:266

### The error may exist in com/jeelowcode/core/framework/mapper/LogApiMapper.java (best guess)

### The error may involve com.jeelowcode.core.framework.mapper.LogApiMapper.insert-Inline

### The error occurred while setting parameters

### SQL: INSERT INTO lowcode_log_api (id, create_time, create_user, create_user_name, create_dept, update_user, update_time, tenant_id, ip, title, model_title, method_name, method_class, time, request_uri, request_method, request_params) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

### Cause: org.postgresql.util.PSQLException: 错误: 字段 "tenant_id" 的类型为 bigint, 但表达式的类型为 character varying

  建议:你需要重写或转换表达式

  位置:266

; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: 错误: 字段 "tenant_id" 的类型为 bigint, 但表达式的类型为 character varying

  建议:你需要重写或转换表达式


回答4

maweiyuan
@超级管理员

是不是可以考虑每一次发布的代码  对应的数据库变更sql单独放一个文件,而不是放在总文件中,我今天更新的时候就发生了这个问题

写回答

扫码关注

微信公众号二维码