a5sys / doctrine-migration-tools-bundle
Ease use of doctrine migrations
Installs: 9 772
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 5
Forks: 4
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=7.1
- doctrine/doctrine-migrations-bundle: ^2.0
- doctrine/migrations: ^2.3
- symfony/framework-bundle: ~3.4|~4.0|~5.0
This package is auto-updated.
Last update: 2024-10-29 04:25:31 UTC
README
Tools for the doctrine migration bundle
Installation
composer require a5sys/doctrine-migration-tools-bundle
Generate versions from schema file for the doctrine-migration
The diff command of doctrine generate the version file from the diff between your database and the current schema.
This command generate the version from the diff between the schema stored in a file and your current schema.
So you only have to run the command before doing a new version of your app.
php bin/console doctrine:migrations:diff-file
A version file will be generated (if required) and your current schema will be dumped in a file. (in /app/DoctrineMigrations/SchemaVersion)
You can automatically check that the migrations have been generated using the check option
php bin/console doctrine:migrations:diff-file --check
The exit code 1 will be used if a migration should have been generated