You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In doctrine/dbal#5784, the event system of the DBAL has been deprecated. In ORM projects, the DBAL events were often used to modify the schema that the ORM generated, before it was compared to the current database. Possible use-cases are:
Injecting additional tables that are not managed by the ORM.
Adding unmapped columns to tables.
Replacing mapped tabled with views.
Adding triggers and other elements the ORM does not care about.
I think, we should create such a hook in the ORM, which would allow projects to migrate away from DBAL's event system.
The text was updated successfully, but these errors were encountered:
The ORM already triggers \Doctrine\ORM\Tools\ToolEvents::postGenerateSchema to let event listeners modify the schema exactly at that point. And this covers at least the first 2 bullet points (I'm doing that in prod since years). For the last 2 bullet points, it depends whether such things can be achieved with the Schema API (if the Schema cannot represent them, no extension points allowing to change the Schema before comparing it will ever support them)
Feature Request
Summary
In doctrine/dbal#5784, the event system of the DBAL has been deprecated. In ORM projects, the DBAL events were often used to modify the schema that the ORM generated, before it was compared to the current database. Possible use-cases are:
I think, we should create such a hook in the ORM, which would allow projects to migrate away from DBAL's event system.
The text was updated successfully, but these errors were encountered: