title: Sequence in H2 DB not found
body: <p>I am trying to do junit testing in Spring Boot 2.1.4 using H2 embedded db. I am facing a peculiar issue with sequence. So according to spring boot and h2 tutorial, I have a schema.sql script to generate my relevant tables:</p>
  
  <pre><code>create sequence seq_test increment by 50;
  </code></pre>
  
  <p>I can see that the create sequence is called from debug logs.</p>
  
  <p>To test if sequence is working, I ran a nextval() on it but got a table seq_test is not created error. This only happens for sequence, when i queried a normal table, I got a proper result.</p>
  
  <p>Test Case:</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @ActiveProfiles("test")
  @SpringBootTest
  @Import({EmbeddedRedis.class, EmbeddedRabbitMQ.class})
  @Slf4j
  public class ProfileCreationTests {
  
      @Autowired
      private EntityManager em;
  
      @Test
      public void profileCreationTest() {
          Query query = em
                  .createNativeQuery("SELECT NEXTVAL(seq_test)");
          log.info(query.getSingleResult().toString());
          log.info(em.createNativeQuery("SELECT count(*) FROM tbl_test").getSingleResult().toString());
      }
  
  
  }
  </code></pre>
  
  <p>First line errors out, if i comment it out, second query runs ok.</p>
  
  <p>app config:
      spring:
        profiles: test
        h2:
          console:
            enabled: true
        jpa:
          hibernate:
            use-new-id-generator-mappings: true</p>