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

MongoDB extension breaks createIndex on MariaDB 10 #293

Open
kabroxiko opened this issue Sep 7, 2022 · 5 comments
Open

MongoDB extension breaks createIndex on MariaDB 10 #293

kabroxiko opened this issue Sep 7, 2022 · 5 comments
Assignees
Labels
TypeBug Something isn't working

Comments

@kabroxiko
Copy link

Environment

Liquibase Version: 4.15.0

Liquibase Integration & Version: CLI

Database Vendor & Version: mariadb 10

Description

createIndex doesn't do anything

Steps To Reproduce

Use:

    <changeSet author="myself" id="createTablePerson">
        <createTable tableName="users">
            <column name="id" type="BIGINT">
                <constraints nullable="false"/>
            </column>
            <column name="phone" type="BIGINT">
                <constraints nullable="false"/>
            </column>
        </createTable>
    </changeSet>
    <changeSet author="myself" id="createIndexId">
        <createIndex indexName="idx_users_id" tableName="users">
            <column name="id"/>
        </createIndex>
    </changeSet>
    <changeSet author="myself" id="createIndexPhone">
        <sql>CREATE INDEX idx_users_phone ON users(phone);</sql>
    </changeSet>

Actual Behavior

The createIndex doesn't give an error and doesn't create any index, the workaround is to create the index with sql command.

Expected/Desired Behavior

createIndex must create the index always or give an error.

@kabroxiko
Copy link
Author

I've found that the problem appears when the mongodb plugin is installed

@kataggart
Copy link

Hey there @kabroxiko - can you please clarify what you were trying to do in which database platform and the details of your Liquibase installation? You noted in the description that it was mariadb, but then said you found a problem in the mongodb plugin. Are you trying to apply the changelog to mariadb or mongo? Assume you have installed the mongodb if you believe there is a problem with it? What are the details of the problem with the plugin that you see? Thanks!

@FBurguer FBurguer self-assigned this Sep 9, 2022
@alkismavridis
Copy link

alkismavridis commented Sep 29, 2022

Also affected. And I also have the mongo plugin installed.
We migrate from mongo to sql, so we need to have both enabled for a while.

DB: Postgress
Liquibase Versions (from our gradle file):

  implementation(group = "org.liquibase", name = "liquibase-core", version = "4.8.0")
  implementation(group = "org.liquibase.ext", name = "liquibase-mongodb", version = "4.8.0")

@kevin-atx kevin-atx transferred this issue from liquibase/liquibase Sep 30, 2022
@kevin-atx kevin-atx changed the title createIndex not working MongoDB extension breaks createIndex on MariaDB 10 Sep 30, 2022
@kevin-atx kevin-atx added the TypeBug Something isn't working label Sep 30, 2022
@FBurguer
Copy link

Managed to reproduce this issue with liquibase and liquibase-mongodb 4.16.1. We will add this issue to our list of issues to fix. Thanks!

@LeBezout
Copy link

LeBezout commented Oct 5, 2022

Same as #275 i think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TypeBug Something isn't working
Projects
Status: Open Issues
Development

No branches or pull requests

6 participants