hibernate ddl-auto=update for indexed column("bit NOT NULL DEFAULT 0") result in reset of data to 0
<ul>
<li>MySQL Version = 5.5.51</li>
<li>SpringBoot Version = 1.2.8.RELEASE</li>
<li>mysql-connector-java = 5.1.36</li>
</ul>

<h2>Given:</h2>

<p>I have an entity which has an index on a column(<code>deliveryIndicator</code>) whose data type is <code>"bit NOT NULL DEFAULT 0"</code>.</p>

<p>I have set <code>ddl-auto</code> to <code>update</code> in my application.properties like this:</p>

<pre><code>        spring.jpa.hibernate.ddl-auto = update
</code></pre>

<h2>When</h2>

<p>When I ran my application </p>

<h2>Then</h2>

<p>JPA reset the all the data for the <code>deliveryIndicator</code>  column to <code>0</code>.</p>

<p><code>Note: other index column data are not resetting.</code></p>

<h1>My entity is defined like this</h1>

<pre><code>    @Entity
    @Table(name = "Office",
            indexes = {@Index(name = "geo_index", columnList = "latitude,longitude"),
            @Index(name = "deliveryIndicator", columnList = "deliveryIndicator")})
    public class Office {

        @Id
        @Column(name = "id")
        private long id;

        @Column(name = "longitude")
        private Double longitude;

        @Column(name = "latitude")
        private Double latitude;

        @Column(name = "parkingIndicator", columnDefinition = "bit NOT NULL DEFAULT 0")
        private boolean parkingIndicator;

        @Column(name = "disabilityIndicator", columnDefinition = "bit NOT NULL DEFAULT 0")
        private boolean disabilityIndicator;

        @Column(name = "deliveryIndicator", columnDefinition = "bit NOT NULL DEFAULT 0")
        private boolean deliveryIndicator;
        }
</code></pre>

<h1>Now, I have tried following to fix it:</h1>

<p>Removed the index on <code>deliveryIndicator</code>.</p>

<pre><code>    @Entity
    @Table(name = "Office",
            indexes = {@Index(name = "geo_index", columnList = "latitude,longitude")})
    public class Office {....}
</code></pre>

<p>After this when I ran the application (after bringing back the DB to the previous state) the <code>deliveryIndicator</code> column data was not effected/resetted.</p>

<h1>My query is :</h1>

<ul>
<li>Why this is happening.</li>
<li>Is there any other solution for this.  </li>
</ul>