java - Postgresql 的 Liquibase addAutoIncrement 错误

标签 java hibernate spring-boot liquibase liquibase-hibernate

我在尝试使用 liquibase 和 Spring Boot 创建自动增量时遇到问题,并出现以下错误

<addAutoIncrement 
        columnDataType="bigint"
        columnName="id"
        incrementBy="1"
        startWith="4"
        tableName="jhi_user" />



Caused by: org.postgresql.util.PSQLException: ERROR: cross-database references are not implemented: "public.public.jhi_user_id_seq"
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:303)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:289)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:266)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:262)
at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95)
at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:307)
... 17 common frames omitted

最佳答案

我刚刚遇到了同样的问题。降级到 3.5.1 对我有帮助。

这可能是您的问题:

https://liquibase.jira.com/browse/CORE-2975

编辑:3.5.5 也可以使用

关于java - Postgresql 的 Liquibase addAutoIncrement 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45259495/

相关文章:

java - 如何使用spark java从表单中获取数据?

java - JMagick 配置文件无法定位 Java 目录

java - org.springframework.dao.InvalidDataAccessApiUsageException

spring-boot - 如何在 Spring Boot 应用程序中运行多个 Controller ?

java - 生成多个范围之间的随机数

java - 如何静默编译Java文件除非出现错误?

java - 无法解析 LocalDateTime 中日期和时间之间的空格

Java,将可序列化对象转换(转换)为其他对象

spring - 如何从 java 代码配置 spring boot 服务器(初始化时)?

java - 使用 Spring Security 基于角色的授权