# H2 timestamp precision

**URL:** <https://forum.liquibase.org/t/h2-timestamp-precision/6712>\
**Category:** Community Answers\
**Created:** [April 5, 2022, 9:24am UTC](https://forum.liquibase.org/t/h2-timestamp-precision/6712 "2022-04-05T09:24:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkernevez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/pkernevez/32/585_2.png) [@pkernevez](https://forum.liquibase.org/u/pkernevez)\
**Post date:** [April 5, 2022, 9:24am UTC](https://forum.liquibase.org/t/h2-timestamp-precision/6712/1 "2022-04-05T09:24:53Z")

</div>

Hi all,

We are using liquibase with H2 (dev & integration tests) and postgres (dev & prod).  
With Java17 we face an issue with Hibernate [[HHH-15166] - Hibernate JIRA](https://hibernate.atlassian.net/browse/HHH-15166) that will be solved only in a future major release.

I would like to change the default mapping of ‘datatime’ to 'timestamp(9) ’ instead of ‘timestamp(6)’ only for H2.  
I there a way to change the liquibase to db type mapping ?  
I only found an obsolete thread about it (2010).

Thanks,  
Philippe

---

<div class="post-metadata">

**Author:** ![pkernevez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/pkernevez/32/585_2.png) [@pkernevez](https://forum.liquibase.org/u/pkernevez)\
**Post date:** [April 8, 2022, 1:03pm UTC](https://forum.liquibase.org/t/h2-timestamp-precision/6712/2 "2022-04-08T13:03:08Z")

</div>

Nobody know a way to change the liquibase data type mapping for a DB ?

---

<div class="post-metadata">

**Author:** ![pkernevez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/pkernevez/32/585_2.png) [@pkernevez](https://forum.liquibase.org/u/pkernevez)\
**Post date:** [April 19, 2022, 3:39pm UTC](https://forum.liquibase.org/t/h2-timestamp-precision/6712/3 "2022-04-19T15:39:23Z")

</div>

I finally found a solution to do it by looking at the cassandra ext.  
My solution could be found here: [Solve by overriding the datatype (c99a28d6) · Commits · Philippe Kernevez / hibernate and h2 issue with java 16 · GitLab](https://gitlab.com/pkernevez/hibernate-and-h2-issue-with-java-16/-/commit/c99a28d63c368cea4a3ef8e2c665c134d0cd4255)
