diff --git a/docs/compatibility.md b/docs/compatibility.md index c198324fcbd..f183a4f67b1 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -20,7 +20,7 @@ Below are the [semver](http://semver.org/) ranges representing which versions of | :------------: | :-------------------------------------: | | `7.x` | `^7.4.0 \| ^8.0.0` | | `6.x` | `^6.5.0 \| ^7.0.0 \| ^8.0.0` | -| `5.x` | `^5.13.0` | `^6.0.0 \| ^7.0.0 \| ^8.0.0`| +| `5.x` | `^5.13.0` \| `^6.0.0 \| ^7.0.0 \| ^8.0.0`| | `4.4.x` | `^5.10.0 \| ^6.0.0 \| ^7.0.0 \| ^8.0.0` | | `4.2.x` | `^5.7.0 \| ^6.0.0 \| ^7.0.0 \| ^8.0.0` | | `4.0.x` | `^5.2.0 \| ^6.0.0 \| ^7.0.0 \| ^8.0.0` | diff --git a/lib/model.js b/lib/model.js index bccd6cdf267..1ffca2b1b6e 100644 --- a/lib/model.js +++ b/lib/model.js @@ -1760,9 +1760,7 @@ Model.listIndexes = async function listIndexes() { * * #### Example: * - * Event.ensureIndexes(function (err) { - * if (err) return handleError(err); - * }); + * await Event.ensureIndexes(); * * After completion, an `index` event is emitted on this `Model` passing an error if one occurred. * @@ -1773,7 +1771,7 @@ Model.listIndexes = async function listIndexes() { * * Event.on('index', function (err) { * if (err) console.error(err); // error occurred during index creation - * }) + * }); * * _NOTE: It is not recommended that you run this in production. Index creation may impact database performance depending on your load. Use with caution._ *