I try to generate schema on hsqldb for unit tests, I get an issue when creating table with column default value. It says in documentation that the default value for varchar must be single quote. But it doesn't work when a had single quotes in my hbm file. Without quotes I get another error : unexpected token:Europe because of the "/" I think.
ERROR 20-07-2017 09:55:48 HHH000388: Unsuccessful: create table PUBLIC.COMPANY (ID_COMPANY varchar not null, DESCR_COMPANY varchar not null, COMPANY_TIMEZONE varchar default 'Europe/Brussels', primary key (ID_COMPANY)) - org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:235)
ERROR 20-07-2017 09:55:48 unexpected token: : - org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:236)
update try to escape with / and without single cotes
ERROR 20-07-2017 15:40:57 HHH000388: Unsuccessful: create table PUBLIC.COMPANY_EA (ID_COMPANY varchar not null, DESCR_COMPANY varchar not null, COMPANY_TIMEZONE varchar default Europe\/Brussels, primary key (ID_COMPANY)) - org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:235)
ERROR 20-07-2017 15:40:57 unexpected token: EUROPE - org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:236)
It's the same error than without cote, I try with single quotes and escaping change nothing.
It looks that special words eg:'NONE', 'STANDBY', 'DAY' involve an error too.
update quotes + escaping
ERROR 20-07-2017 15:58:55 HHH000388: Unsuccessful: create table PUBLIC.COMPANY_EA (ID_COMPANY varchar not null, DESCR_COMPANY varchar not null, COMPANY_TIMEZONE varchar default 'Europe\/Brussels', primary key (ID_COMPANY)) - org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:235)
ERROR 20-07-2017 15:58:55 unexpected token: : - org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:236)