@@ -62,6 +62,12 @@ You can configure the path, namespace, table_name and name in your ``config.yml`
6262 Usage
6363-----
6464
65+ .. caution ::
66+
67+ If your application is based on Symfony 3, replace ``php app/console `` by
68+ ``php bin/console `` before executing any of the console commands included
69+ in this article.
70+
6571All of the migrations functionality is contained in a few console commands:
6672
6773.. code-block :: bash
@@ -79,7 +85,7 @@ the ``status`` command:
7985
8086.. code-block :: bash
8187
82- php bin /console doctrine:migrations:status
88+ php app /console doctrine:migrations:status
8389
8490 == Configuration
8591
@@ -100,7 +106,7 @@ for you.
100106
101107.. code-block :: bash
102108
103- $ php bin /console doctrine:migrations:generate
109+ $ php app /console doctrine:migrations:generate
104110 Generated new migration class to " /path/to/project/app/DoctrineMigrations/Version20100621140655.php"
105111
106112 Have a look at the newly generated migration class and you will see something
@@ -129,7 +135,7 @@ migration to execute:
129135
130136.. code-block :: bash
131137
132- $ php bin /console doctrine:migrations:status --show-versions
138+ $ php app /console doctrine:migrations:status --show-versions
133139
134140 == Configuration
135141
@@ -153,7 +159,7 @@ finally migrate when you're ready:
153159
154160.. code-block :: bash
155161
156- $ php bin /console doctrine:migrations:migrate 20100621140655
162+ $ php app /console doctrine:migrations:migrate 20100621140655
157163
158164 For more information on how to write the migrations themselves (i.e. how to
159165fill in the ``up() `` and ``down() `` methods), see the official Doctrine Migrations
@@ -184,7 +190,7 @@ You can skip single migrations by explicitely adding them to the ``migration_ver
184190
185191.. code-block :: bash
186192
187- $ php bin /console doctrine:migrations:version YYYYMMDDHHMMSS --add
193+ $ php app /console doctrine:migrations:version YYYYMMDDHHMMSS --add
188194
189195 Doctrine will then assume that this migration has already been run and will ignore it.
190196
@@ -268,7 +274,7 @@ running the following command:
268274
269275.. code-block :: bash
270276
271- $ php bin /console doctrine:migrations:diff
277+ $ php app /console doctrine:migrations:diff
272278
273279 You should see a message that a new migration class was generated based on
274280the schema differences. If you open this file, you'll find that it has the
@@ -277,7 +283,7 @@ to add the table to your database:
277283
278284.. code-block :: bash
279285
280- $ php bin /console doctrine:migrations:migrate
286+ $ php app /console doctrine:migrations:migrate
281287
282288 The moral of the story is this: after each change you make to your Doctrine
283289mapping information, run the ``doctrine:migrations:diff `` command to automatically
@@ -294,7 +300,7 @@ If you don't want to use this workflow and instead create your schema via
294300
295301.. code-block :: bash
296302
297- $ php bin /console doctrine:migrations:version --add --all
303+ $ php app /console doctrine:migrations:version --add --all
298304
299305 Otherwise Doctrine will try to run all migrations, which probably will not work.
300306
0 commit comments