Hi Team,
I am trying to create a schema for a collection in mongodb using Liquibase.
And once i tried with Liquibase update command i got the three collections created “DATABASECHANGELOG”,“DATABASECHANGELOGLOCK” and “my_collection”. And there was no records inserted in “my_collection” collection . After that I had make some changes in changelog-file as follows
{“databaseChangeLog”:[{“changeSet”:{“id”:“4”,“author”:“your.name”,“changes”:[{“runCommand”:{“command”:{“updateMany”:“my_collection”,“filter”:{“properties.serialNumber”:{“$type”:“string”}},“update”:[{“$set”:{“properties.serialNumber”:{“$toInt”:“$properties.serialNumber”}}}]}}}]}}]}
to update the schema.
When i executed the liquibase update command . Command is getting executed successfully but no changes in the datatypes. Please help me out on how to update the schema using liquibase.