Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hackzilla/doctrinemigrationprunerbundle
Prune excess doctrine migrations
https://github.com/hackzilla/doctrinemigrationprunerbundle
Last synced: about 2 months ago
JSON representation
Prune excess doctrine migrations
- Host: GitHub
- URL: https://github.com/hackzilla/doctrinemigrationprunerbundle
- Owner: hackzilla
- License: mit
- Created: 2023-10-29T16:17:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-22T21:20:13.000Z (about 1 year ago)
- Last Synced: 2024-04-25T03:44:11.472Z (9 months ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Doctrine Migration Pruner Bundle
## Features
- Automatically prunes old migration files and their corresponding database entries just before running new Doctrine migrations.
- Designed to work in production; migration files should be absent, leaving only the database entries to be removed.
- Handles Doctrine migrations' multiple configurations.
- Prevents warnings about missing migration files if you manually removed them.### Supported Platforms
- MySQL
- Sqlite## Prerequisites
- Requires Doctrine Migration Bundle.
- Tested on Symfony 6, but should work wherever Doctrine Migrations Bundle v3.* is compatible.## Installation
To install the Doctrine Migration Pruner Bundle, you can use composer:```bash
composer require hackzilla/doctrine-migration-pruner-bundle
```## Configuration
Add the following to your application's config:```yaml
hackzilla_doctrine_migration_pruner:
remove_migrations_before: '2007-05-01' # Can be null or a valid date-time
```It's advisable to start with an earlier date-time.
## Usage
Run your Doctrine migrations as you normally would:```bash
bin/console doctrine:migrations:migrate
```Note: The pruning operation will not execute if the `--dry-run` option has been specified.
## Testing
There are currently no tests available.However, you can use
[Doctrine Migration Pruner Repo](https://github.com/hackzilla/DoctrineMigrationPruner) to test the migration pruning.## Contributions and Issues
See all contributors on [GitHub](https://github.com/hackzilla/DoctrineMigrationPrunerBundle/graphs/contributors).Please report issues using GitHub's issue tracker: [GitHub Repo](https://github.com/hackzilla/DoctrineMigrationPrunerBundle)
If you find this project useful, consider [buying me a coffee](https://www.buymeacoffee.com/hackzilla).
## License
This bundle is released under the MIT license. See the [LICENSE](https://github.com/hackzilla/DoctrineMigrationPrunerBundle/blob/main/LICENSE) file for details.