Closed LeonidasJP closed 9 months ago
To me, this should be done by hooking into the postGenerateSchema
event of the ORM to modify the Schema object to define the expected comment.
The DBAL schema-diffing should be able to update the comment (and if not, it would be a legitimate feature request on the DBAL project.
Thanks for the input, @stof! Seems I was looking in the wrong place to start to hook in.
I noticed DBAL does generate the schema correctly, but is not noticing the changed comment in the TableDiff. I have opened an issue DBAL-side (doctrine/dbal#6205) to request/fix that. Will close this issue in favor of the DBAL sided one
Feature Request
Summary
Is there a possibility to hook in to
migrations:diff
, to add additional changes to the diff generated bymigrations:diff
?I'm working on a custom anonimization tool, which maps the "method to anonymize" to a database comment. Updating the comment directly works for new tables and for columns, but not for already existing tables. This might also be more prone to typos or unsupported syntax, so I'm planning to use custom annotations/attributes (
@Anonymize
/@AnonymizeExcept
), but I have yet to find a way to have those annotations be seen and alter the database comments for me.Is there a way I can hook in to the
migrations:diff
process, so I can: