记录日志lowcode_log_api报错

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

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


评论区

超级管理员 2025-02-19 09:22

收到

超级管理员 2025-02-19 09:24

你可以先把本地的tenantId字段改为long,后面我们统一改发布

rain 2025-02-19 09:49

好的

maweiyuan 2025-02-19 19:33

@超级管理员

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

回复