H2 “runscript” command turns all table names into uppercase

爱⌒轻易说出口 提交于 2019-12-04 01:55:39

Found the issue. By default, h2 has this setting set to true DATABASE_TO_UPPER. Setting that to false will save the data as expected. So in my INIT command (before it), I entered:

 jdbc:h2:mem:~/test;DATABASE_TO_UPPER=false;INIT=runscript from '~/schema.sql'

Now the tables are being inserted in the correct case

Another option is to wrap table/column names in double quotes to preserve casing.

E.g. create table "products" instead of create table products

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!