doctrine / migrations

Doctrine Database Migrations Library
https://www.doctrine-project.org/projects/migrations.html
MIT License
4.65k stars 387 forks source link

Remove migration table from generated comparison schema #1418

Open wmouwen opened 3 months ago

wmouwen commented 3 months ago
Q A
Type bug
BC Break no
Fixed issues #1406

Summary

doctrine/orm#11374

Schemas generated from metadata cause the event ToolEvents::postGenerateSchema to be triggered in the method SchemaTool::getSchemaFromMetadata. It would be helpful to do the same for schemas generated for comparison in SchemaTool::createSchemaForComparison. This PR introduces the new event ToolEvents::postGenerateComparisonSchema.

This new event, given that the PR in doctrine/orm proceeds, can be utilized in a listener to remove the metadata table from the comparison schema.

PR relates to an attempt to fix doctrine/migrations#1406. It requires doctrine/orm#11374 and is a requirement of doctrine/DoctrineMigrationsBundle#529.