title: H2 auto-increment not working after update from 1.4.200 to 2.1.212
body: <p>We are upgrading an application from spring-boot 2.4.3 to 2.7.0. Hibernate core version is 5.6.9.Final.
  2.7.0 is the first one to use H2 database 2.1.212 and we are using it for tests.
  I made some changes based on their guide to migrate to 2.0 but I'm facing one issue for which I haven't found a solution.</p>
  <p>In some integration tests, we are using sql scripts to insert data before running the tests in that class. For example, the scripts insert 3 items in a table, then the test inserts a 4th one and updates one of the initial 3 which already existed.</p>
  <p>The test which does the insert fails with the following error</p>
  <pre><code>DataIntegrityViolationException. Error message: could not execute statement; SQL [n/a]; constraint [&quot;PRIMARY KEY ON studio.exercise(id) ( /* key:1 */ 1, 'Test Exercise', FALSE, 'TEST', NULL, 1, 'TEST', TIMESTAMP '2021-01-01 16:00:13', NULL, NULL)&quot;; 
  SQL statement: insert into exercise (id, created_by, created_on, modified_by, modified_on, archived, image, organization_id, title, type) values (default, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-212]]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
  </code></pre>
  <p>It complains about the fact that it can't insert item with id 1 because another item with that id already exists (inserted by the script). But in the previous H2 database version this wasn't an issue.</p>
  <p>I think that this thread is related to mine but I can't see the understand the proposed solution
  <a href="https://stackoverflow.com/questions/67693182/auto-increment-in-h2-database-doesnt-work-when-requesting-with-postman">AUTO_INCREMENT in H2 database doesn't work when requesting with Postman</a></p>