-
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
renameCollection feature #369
Comments
@isalciuc renaming a collection is an adminCommand. Here's an example for how you can do that {
"databaseChangeLog": [
{
"changeSet": {
"id": "2023.05.22.1",
"author": "Yahya Gilany",
"comment": "Rename collections",
"changes": [
{
"adminCommand": {
"command": {
"$rawJson": {
"renameCollection": "database-name.old-collection-name",
"to": "database-name.new-collection-name"
}
}
}
}
]
}
}
]
} |
It fails with a not very informative NPE exception:
It also requires to run it as admin and to know the database name. On the other hand, this command doesn't require to run as admin and to know the database name:
|
I didn't find any way to rename a collection in MongoDB using Liquibase
The text was updated successfully, but these errors were encountered: