From fc1a03c7051842864878557fc9e072744fbcef6d Mon Sep 17 00:00:00 2001 From: arhimede Date: Fri, 4 Sep 2026 22:19:38 +0300 Subject: [PATCH] Correct migration output path in v7 docs Migrations are generated into src/Core/src/App/src/Migration, per doctrine.migrations.migrations_paths in Core\App\ConfigProvider, not data/doctrine/migrations which does not exist. Signed-off-by: arhimede --- docs/book/v7/commands/generate-database-migrations.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/book/v7/commands/generate-database-migrations.md b/docs/book/v7/commands/generate-database-migrations.md index c7dadfa..cdfe917 100644 --- a/docs/book/v7/commands/generate-database-migrations.md +++ b/docs/book/v7/commands/generate-database-migrations.md @@ -13,7 +13,9 @@ Run the following command in your application’s root directory: vendor/bin/doctrine-migrations diff ``` -If you have mapping modifications, this will create a new migration file under `data/doctrine/migrations/` directory. +If you have mapping modifications, this will create a new migration file under +`src/Core/src/App/src/Migration/`, in the `Core\App\Migration` namespace. +The location comes from the `doctrine.migrations.migrations_paths` key in `Core\App\ConfigProvider`. Opening the migration file, you will notice that it contains some queries that will drop your `oauth_*` tables because they are unmapped (there is no doctrine entity describing them). You should delete your latest migration with the DROP queries in it as we will create another one, without the DROP queries in it. To avoid dropping these tables, you need to add a parameter called `filter-expression`. @@ -94,7 +96,8 @@ Escaping does not help — run the command from your IDE, a Linux shell, or the **Q: Where do generated migrations end up?** -A: Under `data/doctrine/migrations/`. +A: In `src/Core/src/App/src/Migration/`, as classes in the `Core\App\Migration` namespace. +The path is configured under `doctrine.migrations.migrations_paths` in `Core\App\ConfigProvider`, so change it there if you want migrations elsewhere. See [Doctrine ORM](../installation/doctrine-orm.md). **Q: How do I see all options for the command?**