File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,18 @@ table of your production database. Regardless of what server you're on, you
177177can always safely run this command to execute only the migrations that haven't
178178been run yet on *that * particular database.
179179
180+ Skipping Migrations
181+ ~~~~~~~~~~~~~~~~~~~
182+
183+ You can skip single migrations by explicitely adding them to the ``migration_versions `` table:
184+
185+ .. code-block :: bash
186+
187+ $ php app/console doctrine:migrations:version YYYYMMDDHHMMSS --add
188+
189+ Doctrine will then assume that this migration has already been run and will ignore it.
190+
191+
180192Generating Migrations Automatically
181193-----------------------------------
182194
@@ -277,6 +289,15 @@ to create a fresh database and run your migrations in order to get your database
277289schema fully up to date. In fact, this is an easy and dependable workflow
278290for your project.
279291
292+ If you don't want to use this workflow and instead create your schema via
293+ ``doctrine:schema:create ``, you can tell Doctrine to skip all existing migrations:
294+
295+ .. code-block :: bash
296+
297+ $ php app/console doctrine:migrations:version --add --all
298+
299+ Otherwise Doctrine will try to run all migrations, which probably will not work.
300+
280301Container Aware Migrations
281302--------------------------
282303
You can’t perform that action at this time.
0 commit comments