Schema related problems with Flyway / Spring and H2 embedded database

前端 未结 6 2046
孤独总比滥情好
孤独总比滥情好 2020-12-15 11:05

I am building a Spring 3 MVC app that uses a MySQL database and have recently integrated Flyway into the solution to manage the database migrations. I have successfully conf

6条回答
  •  失恋的感觉
    2020-12-15 11:45

    The problem is that the identifier public in the statement is lower case and quoted:

    CREATE TABLE "public"...(...)
    

    It should be either unquoted:

    CREATE TABLE public...(...)
    

    or uppercase:

    CREATE TABLE "PUBLIC"...(...)
    

    The reason why H2 returns the lowercase "public" in the database meta data is that the MySQL mode is used in the database URL (;MODE=MySQL). So not using the MySQL mode might solve the problem.

提交回复
热议问题