Syntax error when declaring column TIME WITH TIME ZONE

Viewed 59

I'm using H2 as an in memory database for a Spring Boot project, the java code declaration is the following:

@Column(name = "dueTime")
private OffsetTime dueTime;

in the H2 SQL migration file, I used the following instruction to add the new column:

ALTER TABLE TASK ADD COLUMN DUE_TIME TIME WITH TIME ZONE;

but I encountered a syntax error for the sentence WITH TIME ZONE;

my question is: how can I declare a column in H2 to hold time (with no date) with timezone information in order to serialize/de-serialize the Java type OffsetTime ?

PS: I tried the TIME declaration but I found time with no time zone information.

Best Regards.

0 Answers
Related