Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexes are recreated using H2 database #173

Closed
thomaszbz opened this issue Dec 27, 2017 · 1 comment · Fixed by #679
Closed

Indexes are recreated using H2 database #173

thomaszbz opened this issue Dec 27, 2017 · 1 comment · Fixed by #679

Comments

@thomaszbz
Copy link

thomaszbz commented Dec 27, 2017

This is a follow-up to #129, eventually duplicates #162, using liquibase-hibernate5:3.6 and liquibase-core:3.5.3, together with H2 database.

Still, I see indexes getting recreated for no apparent reason (when doing a ./mvnw clean package liquibase:diff):

    <changeSet author="thomas (generated)" id="1514386576003-2">
        <dropIndex indexName="idx_transaction_id" tableName="myTable"/>
        <createIndex indexName="idx_transaction_id" tableName="myTable">
            <column name="transactionId"/>
        </createIndex>
    </changeSet>

The index is defined in the entity class via

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

@Entity
@Table(indexes = {
        @Index(name = "idx_transaction_id", columnList = "transactionId")
})

liquibase-maven-plugin is configured as

            <plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                <version>3.5.3</version>
                <dependencies>
                    <dependency>
                        <groupId>org.liquibase.ext</groupId>
                        <artifactId>liquibase-hibernate5</artifactId>
                        <version>3.6</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-beans</artifactId>
                        <version>4.3.13.RELEASE</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.data</groupId>
                        <artifactId>spring-data-jpa</artifactId>
                        <version>1.11.9.RELEASE</version>
                    </dependency>
                    <dependency>
                        <groupId>javax.validation</groupId>
                        <artifactId>validation-api</artifactId>
                        <version>1.1.0.Final</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <propertyFile>src/main/resources/liquibase.properties</propertyFile>
                </configuration>
            </plugin>

┆Issue is synchronized with this Jira Bug by Unito

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants