You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: bundles/phpcr-odm.rst
+18-1Lines changed: 18 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -683,7 +683,7 @@ To use the ``doctrine:phpcr:fixtures:load`` command, you additionally need to in
683
683
684
684
Fixtures work the same way they work for Doctrine ORM. You write fixture classes implementing
685
685
``Doctrine\Common\DataFixtures\FixtureInterface``. If you place them in <Bundle>\DataFixtures\PHPCR,
686
-
they will be autodetected if you specify no path to the fixture loading command.
686
+
they will be auto detected if you specify no path to the fixture loading command.
687
687
688
688
A simple example fixture class looks like this:
689
689
@@ -707,6 +707,23 @@ A simple example fixture class looks like this:
707
707
708
708
For more on fixtures, see the `documentation of the DoctrineFixturesBundle <http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html>`_.
709
709
710
+
Migration loading
711
+
-----------------
712
+
713
+
The DoctrinePHPCRBundle also ships with a simple command to run migration scripts. Migrations
714
+
should implement the ``Doctrine\Bundle\PHPCRBundle\Migrator\MigratorInterface`` and registered
715
+
as a service with a ``doctrine_phpcr.migrator`` tag contains an ``alias`` attribute uniquely
716
+
identifying the migrator. There is an optional ``Doctrine\Bundle\PHPCRBundle\Migrator\AbstractMigrator``
717
+
class to use as a basis. To find out available migrations run:
718
+
719
+
.. code-block:: bash
720
+
721
+
$ php app/console doctrine:phpcr:migrator
722
+
723
+
Then pass in the name of the migrator to run it, optionally passing in an ``--identifier``,
724
+
``--depth`` or ``--session`` argument. The later argument determines which session name to
725
+
set on the migrator, while the first two arguments will simply be passed to the ``migrate()``
726
+
method. You can find an example migrator in the SimpleCmsBundle.
0 commit comments