php bin/console doctrine:migrations:dump-schema

Dump the schema for your database to a migration.

Usage

doctrine:migrations:dump-schema [--configuration CONFIGURATION] [--em EM] [--conn CONN] [--formatted] [--namespace NAMESPACE] [--filter-tables FILTER-TABLES] [--line-length [LINE-LENGTH]]

Options

      --configuration   The path to a migrations configuration file. <comment>[default: any of migrations.{php,xml,json,yml,yaml}]</comment> 
      --em              The name of the entity manager to use. 
      --conn            The name of the connection to use. 
      --formatted       Format the generated SQL. 
      --namespace       Namespace to use for the generated migrations (defaults to the first namespace definition). 
      --filter-tables   Filter the tables to dump via Regex. 
      --line-length     Max line length of unformatted lines. 

Help

The doctrine:migrations:dump-schema command dumps the schema for your database to a migration:

    bin/console doctrine:migrations:dump-schema

After dumping your schema to a migration, you can rollup your migrations using the migrations:rollup command.