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

Can't create index [Validation Failed]

Open mityi opened this issue 3 years ago • 1 comments

I'm building a docker container with liquibase-mongodb and run test changelogs on empty mongodb:

Index creation was failed with the exception:

Caused by: liquibase.exception.ValidationFailedException: Validation Failed:
     4 changes have validation failures
          No columns defined for createIndex on mongodb, changelog/changelog-master.xml::1::alex
          tableName is required for createIndex on mongodb, changelog/changelog-master.xml::1::alex
          No columns defined for createIndex on mongodb, changelog/changelog-master.xml::1::alex
          tableName is required for createIndex on mongodb, changelog/changelog-master.xml::1::alex

Dockerfile:

FROM liquibase/liquibase:4.4.2
USER liquibase
ENV LIQUIBASE_CORE_VERSION 4.4.2
ENV MONGO_JAVA_DRIVER_VERSION 3.12.10
RUN wget --no-verbose -O /liquibase/lib/liquibase-mongodb-${LIQUIBASE_CORE_VERSION}.jar https://repo1.maven.org/maven2/org/liquibase/ext/liquibase-mongodb/${LIQUIBASE_CORE_VERSION}/liquibase-mongodb-${LIQUIBASE_CORE_VERSION}.jar
RUN wget --no-verbose -O /liquibase/lib/mongo-java-driver-${MONGO_JAVA_DRIVER_VERSION}.jar https://repo1.maven.org/maven2/org/mongodb/mongo-java-driver/${MONGO_JAVA_DRIVER_VERSION}/mongo-java-driver-${MONGO_JAVA_DRIVER_VERSION}.jar
CMD ["sh", "-c", "docker-entrypoint.sh --url=${DB_URL} --username=${DB_USER} --password=${DB_PASS} --classpath=/liquibase/changelog --changeLogFile=${LIQUIBASE_MASTER_FILE} update"]

As I understand it's incorrect behavior.

Do u know any hacks or ways to fix it?

┆Issue is synchronized with this Jira Bug by Unito

mityi avatar Aug 09 '21 15:08 mityi

@AlexanderSashchenko , Could you please look into this.. I am also facing the same issue

vshalgarg avatar Mar 08 '22 12:03 vshalgarg