0

I'm trying to create a ER Diagram from mysqldump file by reverse engineer, everything works but relationship connections wont show in Workbench.

Note on Workbench: Foreign keys can only be defined for certain storage engines (like InnoDB).

mysql> SELECT TABLE_NAME,
    ->        ENGINE
    -> FROM   information_schema.TABLES
    -> WHERE  TABLE_SCHEMA = 'db_example';

+--------------------+--------+
| TABLE_NAME         | ENGINE |
+--------------------+--------+
| difficulty         | MyISAM |
| durations          | MyISAM |
+--------------------+--------+

what i've tried:

application.properties

hibernate.dialect.storage_engine=innodb
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect

So i'm trying to change the engine to InnoDB but keeps recreating the database as MyISAM

zemmsoares
  • 313
  • 1
  • 8
  • 27
  • 1
    you can try this : spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL57Dialect spring.jpa.properties.hibernate.dialect.storage_engine=innodb discussed in https://stackoverflow.com/questions/1459265/hibernate-create-mysql-innodb-tables-instead-of-myisam – Pierre Demeestere Dec 09 '22 at 15:27
  • 1
    Worked! relations working on workbench as well! – zemmsoares Dec 09 '22 at 16:38

0 Answers0