HI
my project has two DB. SQL and Mongo, I need to configure our project to automate for both.
I have created two profiles
- mongo - in mongo i have following two dependencies added:
org.liquibase.ext
liquibase-mongodb
4.3.2
org.mongodb
mongo-java-driver
3.12.10
Following are my mongo.properties
changeLogFile: src/main/resources/db/mongo/web_db/master.xml
url: mongodb://hostname:2052/@@
username:@@@
password:@@@
driver: liquibase.ext.mongodb.database.MongoClientDriver
logLevel: DEBUG
- SQL - in this following dependencies are added:
com.microsoft.sqlserver
mssql-jdbc
7.4.1.jre11
When i run with SQL profile, it runs fine and updates the DB.
But when i run with mongo profile, it gives me following error:
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:4.1.0:update (web_db) on project liquibase:
[ERROR] Error setting up or running Liquibase:
[ERROR] liquibase.exception.DatabaseException: Could not execute: Command failed with error 13 (Unauthorized): 'not authorized on web_db to execute command { collMod: “DATABASECHANGELOGLOCK”, validator: { $jsonSchema: { bsonType: “object”, description: “Database Lock Collection”, required: [ “_id”, “locked” ], properties: { _id: { bsonType: “int”, description: “Unique lock identifier” }, locked: { bsonType: “bool”, description: “Lock flag” }, lockGranted: { bsonType: “date”, description: “Timestamp when lock acquired” }, lockedBy: { bsonType: [ “string”, “null” ], description: “Owner of the lock” } } } }, validationLev
i have made sure that my user has correct permissions i.e write.
anything i am missing?