=8.1","doctrine/doctrine-bundle":"^2.7","doctrine/migrations":"^ 3.5",&qu">
Run an empty project. I currently have the following in my composer.json file:
"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" },
When I run ./vendor/bin/doctrine-migrations
, I see the following command:
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
There is no diff
command. When I try to run diff
it says the command is undefined. Does anyone know what the problem is?
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 athttps://symfony.com/bundles/DoctrineMigrationsBundle/current/index.html#usage.