From 9f32aa71a319a172d04267517a93917b09e8708d Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Tue, 10 Jun 2025 11:18:58 -0400 Subject: [PATCH] doc: notes/tips for `foundry:load-stories` --- docs/index.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 5c6a7d489..cbf34a44d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1537,12 +1537,23 @@ Mark `Stories`_ you want loaded by the command with the ``#[AsFixture]`` attribu // ... } -``bin/console foundry:load-stories category`` will now load the story ``CategoryStory`` in your database. +``bin/console foundry:load-stories category`` will first reset your database, then load the story ``CategoryStory`` +in your database. + +.. note:: + + For the ORM, by default, the database schema is created with ``doctrine:schema:create``. See `Database Reset`_ + for how to use migrations or further customize this behavior. .. note:: If only a single story exists, you can omit the argument and just call ``bin/console foundry:load-stories`` to load it. +.. tip:: + + Use the ``--append`` option to add the story to the database without resetting it first: + ``bin/console foundry:load-stories category --append`` + You can also load stories by group, by using the ``groups`` option: ::