Hello
I am trying to rename a mongodb collection in a yii application and am running into an error:
Exception 'yii\mongodb\Exception' with message 'renameCollection may only be run against the admin database.'
So i have added the complete namespace but still no cigar, any help would be appreciated thank you.
$command = Yii::$app->mongodb->createCommand([
'renameCollection' => MONGODB_DATABASE . '.interim_product',
'to' => MONGODB_DATABASE . '.temp_interim_product'
]);
I have asked the question in https://stackoverflow.com/questions/58094072/renaming-mongodb-collection-in-yii2 too.
Thank you