title: H2 in-memory database for postgresql | Error Code : 90051
body: <p>Using h2 in-memory database for unit testing with Spring. The production database is PostgreSQL. I have following script which works fine on Postgres but failing on h2:</p>
  
  <pre><code>CREATE TABLE address (
    address_id          SERIAL NOT NULL, 
    province_code       char(2), 
    created_timestamp   timestamp(35) with time zone DEFAULT now() NOT NULL
  )
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code>SQL State  : 90051
  Error Code : 90051
  Message    : Scale($"35") must not be bigger than precision("23");
  </code></pre>
  
  <p>Do I need to specify something else in the URL or configuration. Here is the url:</p>
  
  <pre><code>database.url=jdbc:h2:mem:myDb;DB_CLOSE_ON_EXIT=FALSE;INIT=CREATE SCHEMA IF NOT EXISTS TEST
  </code></pre>