@@ -75,8 +75,9 @@ following changes to perform the schema changes on your MongoDB database:
7575 MongoDB database, update the following setting to make sure the migration
7676 specifies the correct database:
7777
78- - Specify ``mongodb`` in the ``$connection`` field of your migration class
79- - Set ``DB_CONNECTION=mongodb`` in your ``.env`` configuration file
78+ - Make sure your ``connections`` array item contains a valid ``mongodb``
79+ entry in your ``config/database.php`` file
80+ - Specify ``"mongodb"`` in the ``$connection`` field of your migration class
8081
8182The following example migration class contains the following methods:
8283
@@ -166,9 +167,9 @@ fields:
166167
167168- Single field index on ``mission_type``
168169- Compound index on ``launch_location`` and ``launch_date``, specifying a descending sort order on ``launch_date``
169- - Unique index on the ``mission_id`` field, specifying the index name "unique_mission_id_idx"
170+ - Unique index on the ``mission_id`` field, specifying the index name `` "unique_mission_id_idx"``
170171
171- Click the :guilabel:`VIEW OUTPUT ` button to see the indexes created by running
172+ Click the :guilabel:`{+code-output-label+} ` button to see the indexes created by running
172173the migration, including the default index on the ``_id`` field:
173174
174175.. io-code-block::
@@ -207,7 +208,7 @@ You can specify index options when calling an index creation method, such
207208as ``index()``, on a ``Blueprint`` instance.
208209
209210The following migration code shows how to add a collation to an index as an
210- index option. Click the :guilabel:`VIEW OUTPUT ` button to see the indexes
211+ index option. Click the :guilabel:`{+code-output-label+} ` button to see the indexes
211212created by running the migration, including the default index on the ``_id``
212213field:
213214
@@ -266,7 +267,7 @@ appropriate helper method on the ``Blueprint`` instance and pass the
266267index creation details.
267268
268269The following migration code shows how to create a sparse and a TTL index
269- by using the index helpers. Click the :guilabel:`VIEW OUTPUT ` button to see
270+ by using the index helpers. Click the :guilabel:`{+code-output-label+} ` button to see
270271the indexes created by running the migration, including the default index on
271272the ``_id`` field:
272273
@@ -297,7 +298,7 @@ You can specify sparse, TTL, and unique indexes on either a single field or
297298compound index by specifying them in the index options.
298299
299300The following migration code shows how to create all three types of indexes
300- on a single field. Click the :guilabel:`VIEW OUTPUT ` button to see the indexes
301+ on a single field. Click the :guilabel:`{+code-output-label+} ` button to see the indexes
301302created by running the migration, including the default index on the ``_id``
302303field:
303304
@@ -342,7 +343,7 @@ method with a ``MongoDB\Laravel\Schema\Blueprint`` parameter. Specify the
342343geospatial index creation details on the ``Blueprint`` instance.
343344
344345The following example migration creates a ``2d`` and ``2dsphere`` geospatial
345- index on the ``spaceports`` collection. Click the :guilabel:`VIEW OUTPUT `
346+ index on the ``spaceports`` collection. Click the :guilabel:`{+code-output-label+} `
346347button to see the indexes created by running the migration, including the
347348default index on the ``_id`` field:
348349
0 commit comments