invenso / doctrine-cleanup-migrations
Invenso DoctrineCleanupMigrations Bundle
Installs: 1 478
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^7.1 | ^8.0
- symfony/config: 4.4.* | 5.4.* | ^6.0
- symfony/console: 4.4.* | 5.4.* | ^6.0
- symfony/dependency-injection: 4.4.* | 5.4.* | ^6.0
- symfony/http-kernel: 4.4.* | 5.4.* | ^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.16
- phpstan/phpstan: ^1.10
This package is auto-updated.
Last update: 2025-05-11 11:25:31 UTC
README
Getting started
This package is used to clean up your migrations locally by compressing it to one file and deleting all references but the two newly created ones.
Installation
To install this package run:
composer require invenso/doctrine-cleanup-migrations
Usage
After installation run:
php bin/console invenso:cleanup:migrations
and follow the logging closely.
Pending migration check
Before deleting everything the cleanup script will check if there are still migrations pending. If that's the case you need to make sure those will be either applied or discarded before being able to proceed.
Run:
php bin/console doctrine:migrations:status
To see more information about the pending versions.
After cleanup migration
After the cleanup you'll get the option to migrate your newly cleaned migrations. The default option is "N" but if you fill out "Y" you'll have to confirm this 2-3 more times.
You can also choose to run the migrations manually:
php bin/console doctrine:migrations:migrate