liquibase-mongodb icon indicating copy to clipboard operation
liquibase-mongodb copied to clipboard

liquibase-mongodb smash-up with createIndex on relational Databases

Open LeBezout opened this issue 2 years ago • 2 comments

2 issues on relational database (h2 for the example) when liquibase-mongodb is in the classpath

Hi, i have installed the liquibase-mongodb extension 4.12.0 to the liquibase (also 4.12.0) "lib" folder with the following dependencies :

  • bson-4.6.1.jar
  • jackson-annotations-2.11.3.jar
  • jackson-core-2.11.3.jar
  • jackson-databind-2.11.3.jar
  • liquibase-mongodb-4.12.0.jar
  • mongodb-driver-core-4.6.1.jar
  • mongodb-driver-sync-4.6.1.jar

When I execute liquibase commands against a non-Mongo project i'm facing two kinds of issue :

  1. [liquibase.integration] dropIndex is not supported on h2
  2. Validation Failed: 3 change sets check sum

The 2 issues seems to be relative to the createIndex change.

Samples projects to reproduce

  1. https://github.com/LeBezout/liquibase-mongodbext-issue-rollback
  2. https://github.com/LeBezout/liquibase-mongodbext-issue-checksums

Bonus : different sizes for the same artifact

Version 4.12.0

  • On maven central : 113 407 bytes (https://search.maven.org/artifact/org.liquibase.ext/liquibase-mongodb/4.12.0/jar)
  • On GitHub : 113 711 bytes (https://github.com/liquibase/liquibase-mongodb/releases/tag/liquibase-mongodb-4.12.0)

What could explain this?

LeBezout avatar Jul 07 '22 15:07 LeBezout

I found the problem with version 4.15.0. the mongodb createIndex method override the core method

without plugin against mariadb: image

with plugin against mariadb: image

kabroxiko avatar Sep 07 '22 23:09 kabroxiko

It also fail on (auto)rollback (here against MySQL) :

liquibase.exception.RollbackImpossibleException: liquibase.exception.RollbackImpossibleException: dropIndex is not supported on mysql

LeBezout avatar Mar 04 '23 11:03 LeBezout