rollback of addPrimaryKey also drops associated index
<p>In liquibase 3.5.0 under Oracle 11g, I have added the following changeSet :</p>
<pre><code>  &lt;changeSet author=&quot;ME&quot; id=&quot;PK_CREATION&quot;&gt;
    &lt;createIndex tableName=&quot;MY_TABLE&quot; indexName=&quot;MY_INDEX&quot; unique=&quot;true&quot;&gt;
      &lt;column name=&quot;ID&quot; /&gt;
    &lt;/createIndex&gt;
    &lt;addPrimaryKey tableName=&quot;MY_TABLE&quot; columnNames=&quot;ID&quot;
      constraintName=&quot;MY_PK&quot; forIndexName=&quot;MY_INDEX&quot; /&gt;
  &lt;/changeSet&gt;
</code></pre>
<p>The result of the <code>updateSQL</code> operation is what I expect :</p>
<blockquote>
<p>CREATE UNIQUE INDEX MY_INDEX ON MY_TABLE(ID);</p>
<p>ALTER TABLE MY_TABLE ADD CONSTRAINT MY_PK PRIMARY KEY (ID) USING INDEX MY_INDEX;</p>
</blockquote>
<p>But the (default) <code>rollbackSQL</code> operation drops the index at the same time as the primary key in the first instruction, which causes the second instruction to fail :</p>
<blockquote>
<p>ALTER TABLE MY_TABLE DROP PRIMARY KEY DROP INDEX;</p>
<p>DROP INDEX MY_INDEX;</p>
</blockquote>
<p>Is there a way to make it work without specifying a custom rollback operation ?</p>