Skip to content

Commit e198daa

Browse files
Minor improvements in the docs
1 parent 528fa8e commit e198daa

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

Resources/doc/index.rst

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Installation
1515

1616
Run this command in your terminal:
1717

18-
.. code-block:: bash
18+
.. code-block:: terminal
1919
2020
$ composer require doctrine/doctrine-migrations-bundle "^2.0"
2121
22-
If you don't use Symfony Flex, you must enable the bundle manually in the application:
22+
If you don't use `Symfony Flex`_, you must enable the bundle manually in the application:
2323

2424
.. code-block:: php
2525
@@ -61,7 +61,7 @@ Usage
6161

6262
All of the migrations functionality is contained in a few console commands:
6363

64-
.. code-block:: bash
64+
.. code-block:: terminal
6565
6666
doctrine
6767
doctrine:migrations:diff [diff] Generate a migration by comparing your current database to your mapping information.
@@ -78,7 +78,7 @@ All of the migrations functionality is contained in a few console commands:
7878
Start by getting the status of migrations in your application by running
7979
the ``status`` command:
8080

81-
.. code-block:: bash
81+
.. code-block:: terminal
8282
8383
$ php bin/console doctrine:migrations:status
8484
@@ -106,7 +106,7 @@ Now, you can start working with migrations by generating a new blank migration
106106
class. Later, you'll learn how Doctrine can generate migrations automatically
107107
for you.
108108

109-
.. code-block:: bash
109+
.. code-block:: terminal
110110
111111
$ php bin/console doctrine:migrations:generate
112112
Generated new migration class to "/path/to/project/app/Migrations/Version20180605025653.php"
@@ -153,7 +153,7 @@ like the following:
153153
If you run the ``status`` command it will now show that you have one new
154154
migration to execute:
155155

156-
.. code-block:: bash
156+
.. code-block:: terminal
157157
158158
$ php bin/console doctrine:migrations:status --show-versions
159159
@@ -184,7 +184,7 @@ migration to execute:
184184
Now you can add some migration code to the ``up()`` and ``down()`` methods and
185185
finally migrate when you're ready:
186186

187-
.. code-block:: bash
187+
.. code-block:: terminal
188188
189189
$ php bin/console doctrine:migrations:migrate 20180605025653
190190
@@ -193,6 +193,7 @@ fill in the ``up()`` and ``down()`` methods), see the official Doctrine Migratio
193193
`documentation`_.
194194

195195
.. tip::
196+
196197
If you need to use another database connection to execute migrations you may use option ``--db="doctrine-connection-name"``
197198
where ``doctrine-connection-name`` is valid Doctrine connection defined in doctrine.yaml
198199

@@ -219,7 +220,7 @@ Skipping Migrations
219220

220221
You can skip single migrations by explicitly adding them to the ``migration_versions`` table:
221222

222-
.. code-block:: bash
223+
.. code-block:: terminal
223224
224225
$ php bin/console doctrine:migrations:version YYYYMMDDHHMMSS --add
225226
@@ -301,7 +302,7 @@ With this information, Doctrine is now ready to help you persist your new
301302
doesn't exist yet! Generate a new migration for this table automatically by
302303
running the following command:
303304

304-
.. code-block:: bash
305+
.. code-block:: terminal
305306
306307
$ php bin/console doctrine:migrations:diff
307308
@@ -310,7 +311,7 @@ the schema differences. If you open this file, you'll find that it has the
310311
SQL code needed to create the ``user`` table. Next, run the migration
311312
to add the table to your database:
312313

313-
.. code-block:: bash
314+
.. code-block:: terminal
314315
315316
$ php bin/console doctrine:migrations:migrate
316317
@@ -327,7 +328,7 @@ for your project.
327328
If you don't want to use this workflow and instead create your schema via
328329
``doctrine:schema:create``, you can tell Doctrine to skip all existing migrations:
329330

330-
.. code-block:: bash
331+
.. code-block:: terminal
331332
332333
$ php bin/console doctrine:migrations:version --add --all
333334
@@ -338,7 +339,7 @@ Manual Tables
338339

339340
It is a common use case, that in addition to your generated database structure
340341
based on your doctrine entities you might need custom tables. By default such
341-
tables will be removed by the doctrine:migrations:diff command.
342+
tables will be removed by the ``doctrine:migrations:diff`` command.
342343

343344
If you follow a specific scheme you can configure doctrine/dbal to ignore those
344345
tables. Let's say all custom tables will be prefixed by ``t_``. In this case you
@@ -375,3 +376,4 @@ will need to be placed per-connection.
375376
.. _documentation: https://www.doctrine-project.org/projects/doctrine-migrations/en/current/index.html
376377
.. _DoctrineMigrationsBundle: https://github.com/doctrine/DoctrineMigrationsBundle
377378
.. _`Doctrine Database Migrations`: https://github.com/doctrine/migrations
379+
.. _`Symfony Flex`: https://symfony.com/doc/current/setup/flex.html

0 commit comments

Comments
 (0)