-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to generate the change logs on on mongodb existing database and also index creation not working on json format. #299
Comments
Mongo extension does not support generateChangeLog For the index, you need to specify the keys tag |
Thank for the reply. Currently we are using XML format only. I want to know
whether json indexing works or not?
…On Thu, Oct 20, 2022, 6:19 PM oliallan14 ***@***.***> wrote:
Mongo extension does not support generateChangeLog
For the index, you need to specify ext:keys tag
see here for an example
<https://github.com/liquibase/liquibase-mongodb/blob/main/src/test/resources/liquibase/ext/changelog.create-index.test.xml>
—
Reply to this email directly, view it on GitHub
<#299 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGMLP2OBQWWLQD7CRB7NZVDWEE5WZANCNFSM6AAAAAARKDKERQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@oliallan14 Thanks for the reply. Currently we are using XML format only. |
sorry I am not sure if json format supports indexing |
We're checking with 4.23.0 to see if we can reproduce this. |
It seems like the code generated by the changelog is leaving the "key" value of |
Hi Team,
Not able to generate the change logs on on MongoDB existing database and also index creation not working on Json format.
I am using liquibase 4.15 and mongodb 4.4 version.
{ "databaseChangeLog": [{ "property": { "name": "collection.name", "value": "person3" } }, { "changeSet": { "id": "12334d", "author": "murali", "changes": [{ "createIndex": { "collectionName": "${collection.name}", "indexQuery": { "clientId": 1,"type": 1 }, "indexOptions": { "$rawJson": { "unique": true, "name": "new_index_key" } } } }] } } ] }
`Caused by: com.mongodb.MongoCommandException: Command failed with error 67 (CannotCreateIndex): 'Error in specification { key: {} } :: caused by :: Index keys cannot be empty.' on server localhost:27017. The full response is {"ok": 0.0, "errmsg": "Error in specification { key: {} } :: caused by :: Index keys cannot be empty.", "code": 67, "codeName": "CannotCreateIndex"}
`
The text was updated successfully, but these errors were encountered: