title: How to reference the default schema in liquibase preCondition sqlCheck
body: <p>Posting here in case it helps someone.</p>
  <pre><code>TLDR: ${database.defaultSchemaName} within sqlCheck to access default schema name
  </code></pre>
  <p>I wanted my database <code>changeset</code> to first check if a certain row is present in the database. If not present, it should execute the <code>changeset</code>.</p>
  <p>Example:</p>
  <p><strong>myschema.customers</strong>:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>uuid</th>
  <th>name</th>
  <th>age</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>0001</td>
  <td>Bob</td>
  <td>22</td>
  </tr>
  <tr>
  <td>0002</td>
  <td>Sally</td>
  <td>25</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>What I want: liquibase to check if uuid = 0002 is present in the <code>myschema.customers</code> table. If so, run the <code>changeset</code>, otherwise skip over it.</p>
  <p>Initially I tried this:</p>
  <pre><code>&lt;changeSet id=&quot;00000000000007&quot; author=&quot;jhipster&quot;&gt;
      &lt;preConditions onFail=&quot;MARK_RAN&quot;&gt;
          &lt;sqlCheck expectedResult=&quot;0&quot;&gt;
              select count(*) from customers WHERE uuid= '0002'
          &lt;/sqlCheck&gt;
      &lt;/preConditions&gt;
      &lt;insert tableName=&quot;customers&quot;&gt;
          &lt;column name=&quot;uuid&quot; value=&quot;0002&quot;&gt;&lt;/column&gt;
          &lt;column name=&quot;name&quot; value=&quot;Sally&quot;&gt;&lt;/column&gt;
          &lt;column name=&quot;age&quot; value=&quot;25&quot;&gt;&lt;/column&gt;
      &lt;/insert&gt;
  &lt;/changeSet&gt;
  </code></pre>
  <p>Bear in mind that I have set the following configuration for liquibase (4.6.1)</p>
  <pre><code>spring:
      liquibase:
          default-schema: myschema
  </code></pre>
  <p>But it seems precondition sqlcheck was checking <code>public.customers</code> and not <code>myschema.customers</code>. This would cause an error when uuid 0002 is already present in <code>myschema.customers</code>.</p>
  <hr />
  <p><strong>SOLUTION</strong>: use <code>${database.defaultSchemaName}</code></p>
  <pre><code>&lt;preConditions onFail=&quot;MARK_RAN&quot;&gt;
      &lt;sqlCheck expectedResult=&quot;0&quot;&gt;
          select count(*) from ${database.defaultSchemaName}.customers WHERE uuid= '0002'
      &lt;/sqlCheck&gt;
  &lt;/preConditions&gt;
  </code></pre>