[英]Migrating Spring boot JPA(MySQL) to JPA(PostgreSQL) throws an ERROR
我有一个使用JPA的Spring Boot Web应用程序,而MySQL是数据库。 我必须从MySQL数据库迁移到PostgreSQL。 将PostgreSQL配置为应用程序时,某些表(实体)会导致ERROR。
JPA的“创建”选项正常运行。 但是将create更改为“ update”时,程序将终止并显示错误。
错误是
'列i.indproc不存在提示:也许您想引用“ i.indpred”列。 位置:610'
ERROR 31134 --- [ restartedMain] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory'..... [PersistenceUnit: default] Unable to build Hibernate SessionFactory at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
n.SQLGrammarException: Error accessing index information: table_user
Caused by: org.postgresql.util.PSQLException: ERROR: column i.indproc does not exist
我遇到了类似的错误。 将postgreql maven依赖升级到最新版本可修复我的错误。 在2019年8月
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.6</version>
</dependency>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.