How to create tables as InnoDB in jpa?

Basil Battikhi :

Im trying to create tables as innodb in order to use foreign keys but i got failed my tables are staying as myIssam engine!

My mysql version is 5.7.26 and here is my application.properties

spring.datasource.url=jdbc:mysql://localhost:3306/general_security?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=basil
spring.datasource.password=root
spring.jpa.properties.hibernate.show_sql=true
spring.jpa.properties.hibernate.use_sql_comments=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.type=debug
spring.jpa.hibernate.ddl-auto=create
hibernate.dialect.storage_engine=innodb
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

spring.datasource.hikari.maximum-pool-size=50

server.servlet.context-path=/generalSecurity
spring.jmx.default-domain: general_security

i also tried

spring.jpa.database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
scaisEdge :

You could try

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL57Dialect
spring.jpa.properties.hibernate.dialect.storage_engine=innodb

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=131231&siteId=1