mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Remove _ensureIndex log warning
This commit is contained in:
@@ -698,10 +698,10 @@ Object.assign(Mongo.Collection.prototype, {
|
||||
var self = this;
|
||||
if (!self._collection._ensureIndex || !self._collection.createIndex)
|
||||
throw new Error("Can only call createIndex on server collections");
|
||||
// TODO enable this message a release before we will remove this function
|
||||
// import { Log } from 'meteor/logging';
|
||||
// Log.debug(`_ensureIndex has been deprecated, please use the new 'createIndex' instead${options?.name ? `, index name: ${options.name}` : `, index: ${JSON.stringify(index)}`}`)
|
||||
if (self._collection.createIndex) {
|
||||
import { Log } from 'meteor/logging';
|
||||
|
||||
Log.debug(`_ensureIndex has been deprecated, please use the new 'createIndex' instead${options?.name ? `, index name: ${options.name}` : `, index: ${JSON.stringify(index)}`}`)
|
||||
self._collection.createIndex(index, options);
|
||||
} else {
|
||||
self._collection._ensureIndex(index, options);
|
||||
|
||||
Reference in New Issue
Block a user