Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digital Ocean managed database issue with Hibernate n..n generated tables #772

Open
shopizer-ecommerce opened this issue Jun 27, 2022 · 1 comment
Labels

Comments

@shopizer-ecommerce
Copy link
Owner

The reason it fails is that DigitalOcean managed MySQL instances are created with sql_require_primary_key on. The Hibernate version shopizer currently uses fails silently when it executes create table thus not creating all the required tables.

@janarthanan-M2
Copy link

janarthanan-M2 commented Feb 7, 2024

Solution - Digital ocean website need subscription to access the mysql instances, so i created new database called database.properties in sm-shop and tested locally in my workbench.
after adding the new database.properties file the non created tables are showing in the salesmanager schema

Changed Properties of Hibernate dialect (added database.properties in sm-shop)

db.jdbcUrl=jdbc:mysql://localhost:3306/SALESMANAGER?autoReconnect=true&serverTimeZone=UTC&useUnicode=true&characterEncoding=UTF-8
db.user=root
db.password=root
db.driverClass=com.mysql.cj.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect

db.show.sql=true
db.preferredTestQuery=SELECT 1
db.schema=SALESMANAGER
hibernate.hbm2ddl.auto=update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants