我遇到的第一个错误
无效操作:不支持 SQL 命令“如果存在 hibernate_sequence,则删除序列”
在例外情况的更下方,我看到以下内容。我假设我必须更改 hibernate_sequence 中索引递增的方式。
Caused by: com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: SQL command "create sequence hibernate_sequence start 1 increment 1" not supported.;
... 49 common frames omitted
2019-10-07 14:02:30,237 WARN [main] org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl: GenerationTarget encountered exception accepting command : Error executing DDL "create sequence hibernate_sequence start 1 increment 1" via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create sequence hibernate_sequence start 1 increment 1" via JDBC Statement
在构建 java Spring Boot 应用程序时,寻求连接并创建新的 redshift DB Cluster V1.0.10393。
POM 和属性文件应该是什么样子?我正在从工作 PostgreSQL 数据库过渡到 redshift。
当前属性
spring.datasource.driver-class-name=com.amazon.redshift.jdbc42.Driver
spring.datasource.url=jdbc:redshift://redshift-cluster-1.cwirererbv4xb.us-east-2.redshift.amazonaws.com:5439/db
spring.datasource.username=awsuser
spring.datasource.password=werwerwerew
spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQL9Dialect
spring.datasource.hikari.connectionTimeout=20000
spring.datasource.hikari.maximumPoolSize=5
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.open-in-view=false
spring.jpa.hibernate.ddl-auto=create
侃侃尔雅
哔哔one
相关分类