How to fix “Error executing DDL ”alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq“ via JDBC Statement”

前端 未结 9 1523
刺人心
刺人心 2021-02-04 04:44

I\'m trying to start spring boot project with MySQL database, but I have some problem with database. I try to start my application that, and server is running but hibernate don\

相关标签:
9条回答
  • 2021-02-04 04:59

    if you see this problem, please double check your class properties for reserved keywords like key(in my case).

    I changed the key to mkey and everything goes fine.

    0 讨论(0)
  • 2021-02-04 05:08

    Just specify the dialect in your application.properties. For example, for MySQL 8:

    hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
    
    0 讨论(0)
  • 2021-02-04 05:09

    It seems that it is an error related to reserved PostgreSQL words. Similar to the top answer (SupaMario's), the error went away after changing one of my column names from

    @Column(name = "name", nullable = false)
    

    to

    @Column(name = "employee_name", nullable = false)
    
    0 讨论(0)
提交回复
热议问题