{"repo":"shipmonk-rnd/doctrine-two-phase-migrations","free":true,"listed":false,"github":"https://github.com/shipmonk-rnd/doctrine-two-phase-migrations","clone":"git clone https://github.com/shipmonk-rnd/doctrine-two-phase-migrations.git","description":"Two phase migrations for Doctrine ORM: before and after deploying new codebase version. Suitable for rolling-update deployments (e.g. in Kubernetes clusters).","language":"PHP","stars":24,"topics":["automation","doctrine","migrations","orm","sql"],"license":null,"category":"databases-storage","readme_excerpt":"Two-phase migrations for Doctrine This lightweight library allows you to perform safer Doctrine migrations during deployment in cluster-based environments like kubernetes where rolling-update takes place. Each migration has two up phases, no down phase. - before - to be called before any traffic hits the new application version - typically contains ADD COLUMN etc. - after - to be called after the deployment is done and no traffic is hitting the old application version - typically contains DROP COLUMN etc. You can see Czech talk about this library on YouTube. Installation: Configuration in Symfony application: Register the bundle in config/bundles.php : Then configure it in config/packages/two phase migrations.yaml : The bundle requires symfony/http-kernel ^6.4+. All commands and services are registered automatically, and Doctrine\\ORM\\EntityManagerInterface is autowired. If you register a custom MigrationExecutor , MigrationAnalyzer , or MigrationVersionProvider service, it will be picked up automatically. All commands accept an optional Psr\\Log\\LoggerInterface . When a logger is available (e.g. via MonologBundle), structured log messages with context are emitted. When no logger is injected, commands fall back to Symfony\\Component\\Console\\Logger\\ConsoleLogger and write directly to the console output. Manual service registration (without the bundle) If your Doctrine\\ORM\\EntityManagerInterface is autowired, just register few services in your DIC and tag the commands: Commands: I","default_branch":null,"files":null,"tree":[],"storefront":"/r/shipmonk-rnd","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/shipmonk-rnd/doctrine-two-phase-migrations/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}