title: Liquibase doesn't update in-memory h2 database
body: <p>I set up a simple spring-boot-application, and wanted to include liquibase for database migrations. I defined a <code>master.xml</code>, which consists of a single reference to another file. This file defines a changeset for creating a table with the name <code>test</code>. Until this point everything seems to be fine. However, after tryining to apply the changes by executing <code>liquibase:update</code>, through the <code>liquibase-maven-plugin</code>, my <code>test</code> table won't be created.</p>
  
  <p>Did i do something wrong in my <code>application-properties</code> or in the <code>pom.xml</code>? Any hints would help :)</p>
  
  <p>Here the code:</p>
  
  <p><code>master.xml</code>:</p>
  
  <pre><code>&lt;databaseChangeLog
          xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"&gt;
      &lt;include relativeToChangelogFile="true" file="migration/0000-init-schema.xml"/&gt;
  &lt;/databaseChangeLog&gt;
  </code></pre>
  
  <p><code>0000-init-schema.xml</code>:</p>
  
  <pre><code>&lt;databaseChangeLog logicalFilePath="db.changelog-1.0.xml" xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"&gt;
      &lt;changeSet author="kezersa72274" id="2020-01-01-1"&gt;
          &lt;comment&gt;Create table test.&lt;/comment&gt;
  
          &lt;createTable tableName="test"&gt;
              &lt;column name="id" type="BIGINT"&gt;
                  &lt;constraints nullable="false" primaryKey="true"/&gt;
              &lt;/column&gt;
          &lt;/createTable&gt;
      &lt;/changeSet&gt;
  &lt;/databaseChangeLog&gt;
  </code></pre>
  
  <p><code>pom.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.2.2.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;de.digiplan&lt;/groupId&gt;
      &lt;artifactId&gt;backend&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;digiplan-backend&lt;/name&gt;
      &lt;description&gt;Digiplan-Backend&lt;/description&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
                      &lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.h2database&lt;/groupId&gt;
              &lt;artifactId&gt;h2&lt;/artifactId&gt;
              &lt;version&gt;1.4.197&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.liquibase&lt;/groupId&gt;
                  &lt;artifactId&gt;liquibase-maven-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;changeLogFile&gt;
                          /src/main/resources/master.xml
                      &lt;/changeLogFile&gt;
                      &lt;driver&gt;org.h2.Driver&lt;/driver&gt;
                      &lt;url&gt;jdbc:h2:mem:digiplan&lt;/url&gt;
                      &lt;username&gt;sa&lt;/username&gt;
                      &lt;password&gt;&lt;/password&gt;
                  &lt;/configuration&gt;
                  &lt;version&gt;3.6.2&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><code>application.properties</code>:</p>
  
  <pre><code>spring.jpa.hibernate.ddl-auto=none
  
  spring.datasource.name=digiplan
  spring.datasource.url=jdbc:h2:mem:digiplan
  spring.datasource.driverClassName=org.h2.Driver
  spring.datasource.username=sa
  spring.datasource.password=
  spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
  
  spring.h2.console.enabled=true
  spring.h2.console.path=/h2-console
  </code></pre>
  
  <p><code>BackendApplication.java</code></p>
  
  <pre><code>package de.digiplan.backend;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class BackendApplication {
      public static void main(String[] args) {
          SpringApplication.run(BackendApplication.class, args);
      }
  }
  </code></pre>
  
  <p><code>BackendApplicationTests.java</code>:</p>
  
  <pre><code>package de.digiplan.backend;
  
  import org.junit.jupiter.api.Test;
  import org.springframework.boot.test.context.SpringBootTest;
  
  @SpringBootTest
  public final class BackendApplicationTests {
      @Test
      void contextLoads() {
      }
  }
  </code></pre>
  
  <p>The logs on calling <code>liquibase:update</code>:</p>
  
  <pre><code>"/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/Home/bin/java" -Dmaven.multiModuleProjectDirectory=/Users/saltukkezer/digiplan-backend "-Dmaven.home=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" "-Dmaven.ext.class.path=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar" "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=64094:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar" org.codehaus.classworlds.Launcher -Didea.version2019.2 org.liquibase:liquibase-maven-plugin:3.6.2:update
  [INFO] Scanning for projects...
  [INFO] 
  [INFO] ------------------------&lt; de.digiplan:backend &gt;-------------------------
  [INFO] Building digiplan-backend 1.0-SNAPSHOT
  [INFO] --------------------------------[ jar ]---------------------------------
  [INFO] 
  [INFO] --- liquibase-maven-plugin:3.6.2:update (default-cli) @ backend ---
  [INFO] ------------------------------------------------------------------------
  [INFO] Starting Liquibase at Sun, 22 Dec 2019 15:39:29 CET (version 3.6.2 built at 2018-07-03 11:28:09)
  [INFO] Executing on Database: jdbc:h2:mem:digiplan
  [INFO] SELECT COUNT(*) FROM DATABASECHANGELOGLOCK
  [INFO] CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))
  [INFO] SELECT COUNT(*) FROM DATABASECHANGELOGLOCK
  [INFO] DELETE FROM DATABASECHANGELOGLOCK
  [INFO] INSERT INTO DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, FALSE)
  [INFO] SELECT LOCKED FROM DATABASECHANGELOGLOCK WHERE ID=1
  [INFO] Successfully acquired change log lock
  [INFO] Creating database history table with name: DATABASECHANGELOG
  [INFO] CREATE TABLE DATABASECHANGELOG (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED TIMESTAMP NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10))
  [INFO] SELECT COUNT(*) FROM DATABASECHANGELOG
  [INFO] Reading from DATABASECHANGELOG
  [INFO] SELECT * FROM DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
  [INFO] SELECT COUNT(*) FROM DATABASECHANGELOGLOCK
  [INFO] CREATE TABLE test (id BIGINT NOT NULL, CONSTRAINT PK_TEST PRIMARY KEY (id))
  [INFO] Table test created
  [INFO] ChangeSet db.changelog-1.0.xml::2020-01-01-1::kezersa72274 ran successfully in 1ms
  [INFO] SELECT MAX(ORDEREXECUTED) FROM DATABASECHANGELOG
  [INFO] INSERT INTO DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('2020-01-01-1', 'kezersa72274', 'db.changelog-1.0.xml', NOW(), 1, '8:86a27a6c6ac5d44947040cf6a87f248c', 'createTable tableName=test', 'Create table test.', 'EXECUTED', NULL, NULL, '3.6.2', '7025570948')
  [INFO] Successfully released change log lock
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  2.600 s
  [INFO] Finished at: 2019-12-22T15:39:30+01:00
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>-> <a href="https://i.stack.imgur.com/quXu8.png" rel="nofollow noreferrer">What the database looks like</a></p>