search

Home  >  Q&A  >  body text

Symfony doctrine/migrations: diff does not exist

<p>Run an empty project. I currently have the following in my composer.json file: </p> <pre class="brush:php;toolbar:false;">"require": { "php": ">=8.1", "doctrine/doctrine-bundle": "^2.7", "doctrine/migrations": "^3.5", "doctrine/orm": "^2.13", "test/framework-bundle": "^6.1@dev", //My latest framework-bundle branch. "symfony/runtime": "^6.1" },</pre> <p>When I run <code>./vendor/bin/doctrine-migrations</code>, I see the following command: </p> <pre class="brush:php;toolbar:false;">migrations migrations:current [current] output the current version migrations:dump-schema [dump-schema] Dump database schema into migrations. migrations:execute [execute] Manually execute one or more migration versions. migrations:generate [generate] Generate an empty migration class. migrations:latest [latest] output the latest version migrations:list [list-migrations] Displays a list of all available migrations and their status. migrations:migrate [migrate] Performs a migration to the specified version or the latest available version. migrations:rollup [rollup] Merges migrations by removing all tracked versions and inserting an existing version. migrations:status [status] View the status of a set of migrations. migrations:sync-metadata-storage [sync-metadata-storage] Ensure the metadata store is at the latest version. migrations:up-to-date [up-to-date] tells you whether your schema is up to date. migrations:version</pre> <p>There is no <code>diff</code> command. When I try to run <code>diff</code> it says the command is undefined. Does anyone know what the problem is? </p>
P粉548512637P粉548512637534 days ago541

reply all(1)I'll reply

  • P粉077701708

    P粉0777017082023-08-27 14:28:50

    I think you need php bin/console doctrine:migrations:diff
    diff: Generate migrations by comparing current database and mapping information.

    You can see more information at https://symfony.com/bundles/DoctrineMigrationsBundle/current/index.html#usage.

    reply
    0
  • Cancelreply