Due to @JakubZalas answer, I looked at the code on Github and saw that changing the code of the framework to accomplish what you want is very simple.
If you check the folder where the AbstractPlatform class is located, you will see that there is a ForeignKeyConstraint class. In it you will see that it inherits from AbstractAsset.
The AbstractAsset class now has a _generateIdentifierName method. If you test this method on github , you will see that it has a commented part that does exactly what you want. You simply uncomment this part, comment on the actual active part, change the $ prefix parameter to $ postfix, and you're done. The constraint name will be generated using the table and column names with the corresponding postfix.
The AbstractAsset.php file is this folder: Symfony / vendor / doctrine / dbal / lib / Doctrine / DBAL / Schema
I tried in my ant project, it worked fine.
One final piece of information: at least for my project, the comment part I mentioned above is only in github, not in the file on my local machine.
Nelson teixeira
source share