{"id":16674872,"url":"https://github.com/hackzilla/doctrinemigrationpruner","last_synced_at":"2025-08-01T15:04:12.881Z","repository":{"id":208709464,"uuid":"717872962","full_name":"hackzilla/DoctrineMigrationPruner","owner":"hackzilla","description":"This example application is designed for demonstration, testing, and educational purposes. It showcases the functionality of the `hackzilla/doctrine-migration-pruner-bundle`, a tool for managing and pruning old Doctrine migration files.","archived":false,"fork":false,"pushed_at":"2023-11-22T21:29:26.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T03:28:00.071Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hackzilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-12T21:18:01.000Z","updated_at":"2024-02-13T14:31:38.000Z","dependencies_parsed_at":"2023-11-22T22:38:38.323Z","dependency_job_id":null,"html_url":"https://github.com/hackzilla/DoctrineMigrationPruner","commit_stats":null,"previous_names":["hackzilla/doctrinemigrationpruner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hackzilla/DoctrineMigrationPruner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackzilla%2FDoctrineMigrationPruner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackzilla%2FDoctrineMigrationPruner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackzilla%2FDoctrineMigrationPruner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackzilla%2FDoctrineMigrationPruner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hackzilla","download_url":"https://codeload.github.com/hackzilla/DoctrineMigrationPruner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackzilla%2FDoctrineMigrationPruner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268248353,"owners_count":24219550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T12:44:44.659Z","updated_at":"2025-08-01T15:04:12.857Z","avatar_url":"https://github.com/hackzilla.png","language":"PHP","funding_links":["https://www.buymeacoffee.com/hackzilla"],"categories":[],"sub_categories":[],"readme":"# Doctrine Migration Prunering\n\n## Overview\nThis example application is designed for demonstration, testing, and educational purposes. It showcases the functionality of the `hackzilla/doctrine-migration-pruner-bundle`, a tool for managing and pruning old Doctrine migration files.\n\n## Features\n- Generates fake Doctrine migration files with random timestamps.\n- Demonstrates the automatic pruning of old migration files by the `hackzilla/doctrine-migration-pruner-bundle`.\n- Useful for understanding how the bundle operates in a real-world scenario.\n\n## Prerequisites\n- Doctrine Migration Bundle v3.\n- MySQL or Sqlite\n\nThe system is currently configured for Sqlite.\n\n## Installation\nUse composer to install the necessary dependencies:\n\n```bash\ncomposer install\n```\n\n## Configuration\nTo configure the `hackzilla_doctrine_migration_pruner` in your Symfony application, add the following to your `config/packages/hackzilla_doctrine_migration_pruner.yaml` file:\n\n```yaml\nhackzilla_doctrine_migration_pruner:\n  remove_migrations_before: '2007-05-01'  # Can be null or a valid date-time\n```\n\n## Usage\n### Generating Migrations\nRun the custom Symfony command to generate migration files:\n\n```bash\nbin/console app:generate-migrations [numMigrations] [startYear] [endYear]\n```\n\n- `numMigrations`: The number of migration files to generate.\n- `startYear`: The start year for random timestamp generation.\n- `endYear`: The end year for random timestamp generation.\n\nTo create 30 migrations between 2019 and 2025:\n\n```bash\nbin/console app:generate-migrations 30 2019 2025\n```\n\n### Running Migrations\nExecute your Doctrine migrations as usual:\n\n```bash\nbin/console doctrine:migrations:migrate\n```\n\nThe pruning operation will automatically occur, removing old migration files and their corresponding database entries.\n\n## Testing\nThis application provides a hands-on way to test and observe the `hackzilla/doctrine-migration-pruner-bundle` in action.\n\n## Contributions and Issues\nSee all contributors on [GitHub](https://github.com/hackzilla/DoctrineMigrationPruner/graphs/contributors).\n\nPlease report issues using GitHub's issue tracker: [GitHub Repo](https://github.com/hackzilla/DoctrineMigrationPruner)\n\nAlertnatively, if have issues with the bundle, please report issues with the bundle issue tracker: [GitHub Repo](https://github.com/hackzilla/DoctrineMigrationPrunerBundle)\n\nIf you find this project useful, consider [buying me a coffee](https://www.buymeacoffee.com/hackzilla).\n\n## License\n\nThis application is released under the MIT license. See the [LICENSE](https://github.com/hackzilla/DoctrineMigrationPruner/blob/main/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackzilla%2Fdoctrinemigrationpruner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackzilla%2Fdoctrinemigrationpruner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackzilla%2Fdoctrinemigrationpruner/lists"}