In a Symfony 5.4 project using symfony/maker-bundle v1.43.0 I experience this issue that the make:migration command adds a deprecated comment to a row structure that actualy causes the DB environment to fail with
"Unknown column type "json_array" requested..."
The DB was migrated during an upgrade of the Symfony project from 3.x.x to 5.4. To fix the mentioned "unknown column" error I removed the comment '(DC2Type:json_array)' as this type is deprecated now and the comment is not needed anymore. In a new migration I removed the comment with
$this->addSql('ALTER TABLE my_table CHANGE my_row my_row LONGTEXT NOT NULL);
and also I changed the OLD migration (the initial one to create this table) by deleting the part that creates that comment. So in the OLD migration I changed
$this->addSql('CREATE TABLE my_table (..., my_row LONGTEXT NOT NULL COMMENT \'(DC2Type:json_array)\', ...);
to
$this->addSql('CREATE TABLE my_table (..., my_row LONGTEXT NOT NULL, ...);
I did this because otherwise the DB creation process when setting the project up from base allways fails when applying the migrations as it won't be able to create the table with the old-style comment.
However - allways when I now create a new migration the maker-system automatically adds the missing comment to the table again by
$this->addSql('ALTER TABLE my_table CHANGE my_row my_row LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\'');
So I allways have to remember and take care to remove this autogenerated but not wanted statement from my migrations - which probably will fail sooner or later. How can I teach the maker-system to not add this comment anymore? I understand that changing an old migration which lives somewhere in the migration stack doesn't seem to be the right thing to do but as the whole migration stack can not be executed successfully anymore with it I don't know any other thing to do. Any ideas on that are much appreciated.