Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Liquibase Hibenate Problems - Dropping and Recreating Indexes

$
0
0
Versions
Liquibase: 3.5.3
Hibernate Plugin: liquibase-hibernate4 - 3.6
Hibenrate JPA: 2.1
Mysql: 5.7.x

When I do a diffChangeLog, it creates changeSets which drops and recreates indexes.

I am running liquibase from command line and hibernate plugin is a dependency copied into lib folder of liquibase.

<changeSet author="harshadchavan (generated)" id="1483141758086-1">
        <dropIndex indexName="ALRTLookup" tableName="Alert"/>
        <createIndex indexName="ALRTLookup" tableName="Alert">
            <column name="enterpriseId"/>
            <column name="timeCreated"/>
            <column name="alertType"/>
        </createIndex>
    </changeSet>

And it does it for 42 tables. Now I tried to find a pattern why it is doing for 42 and not all 69 tables where indexes are present and I could not.

The definition of ALRTLookup is as following

@Entity

@Table(name = "Alert",

    indexes = {

        @Index(name="ALRTLookup", columnList="enterpriseId, timeCreated, alertType")

    })


Definitions for the columns


private String enterpriseId;


private long timeCreated;


public enum AlertType {

        Error,

        Warning,

        Info

    }


@Enumerated(EnumType.STRING)

    private AlertType alertType;



What could cause this?


Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>