doctrine section controls which Doctrine DBAL connection the bundle uses and how the menu tables are named.
Options
The Doctrine DBAL connection name. Set this when your menu tables live on a non-default database connection.
Prefix prepended to all menu table names. An empty string means no prefix.
With
table_prefix: app_, the tables become app_dashboard_menu and app_dashboard_menu_item.config/packages/nowo_dashboard_menu.yaml
Generating migrations
Use the bundle’sgenerate-migration console command instead of doctrine:schema:update whenever you use a custom connection or table prefix. The command reads your configured connection and prefix and generates a migration class accordingly.
Command options
| Option | Description |
|---|---|
--path=src/Migrations | Directory where the migration file is written. Default: migrations/. |
--namespace=App\Migrations | PHP namespace for the generated class. Default: DoctrineMigrations. |
--dump | Print the SQL to the console without writing a file. Useful when you do not use Doctrine Migrations. |
Running migrations on a non-default connection
When your menu tables are on a connection other thandefault, pass --conn to the migrations command:
The generated migration class extends
Doctrine\Migrations\AbstractMigration. Your project must have doctrine/doctrine-migrations-bundle (or doctrine/migrations) installed to run it. If you do not use Doctrine Migrations, use --dump and execute the SQL manually.