liquibase-mongodb
liquibase-mongodb copied to clipboard
Can't create index [Validation Failed]
I'm building a docker container with liquibase-mongodb and run test changelogs on empty mongodb:
- changelog-create-index failed
- changelog-insert-many passed
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?
@AlexanderSashchenko , Could you please look into this.. I am also facing the same issue