[ongeki] Fix event ranking query incompatibility with MySQL/MariaDB

This commit is contained in:
Mikira Sora
2023-03-24 17:51:27 +00:00
committed by Dom Eori
parent 35f0c000bf
commit 447ddd99b0
4 changed files with 47 additions and 10 deletions

View File

@@ -0,0 +1,22 @@
# For testing
## AimeDb server setting
aimedb.server.enable=true
aimedb.server.port=22345
allnet.server.host=localhost
allnet.server.port=80
aimedb.server.address=127.0.0.1
billing.server.enable=true
billing.server.port=8443
## Http Server Port
server.port=80
spring.flyway.locations=classpath:db/migration/mariadb
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.datasource.username=aqua_test
spring.datasource.password=aqua_test
spring.datasource.url=jdbc:mariadb://localhost:3306/aqua_test?useSSL=false
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDB10Dialect
# if you got any exception like while application booting:
# "org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [id] in table [chusan_avatar]; found [int (Types#INTEGER)], but expecting [bigint (Types#BIGINT)]"
# just comment this property and try again.
# spring.jpa.hibernate.ddl-auto=validate

View File

@@ -10,9 +10,8 @@ billing.server.port=8443
## Http Server Port
server.port=80
spring.flyway.locations=classpath:db/migration/mysql
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=aqua_test
spring.datasource.password=aqua_test
spring.datasource.url=jdbc:mariadb://localhost:3306/aqua_test?useSSL=false
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDB10Dialect
spring.jpa.hibernate.ddl-auto=validate
spring.datasource.url=jdbc:mysql://localhost:13306/aqua_test?useSSL=false&allowPublicKeyRetrieval=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect