rectorphp/rector-doctrine

[Rule Idea] Add a rule which remove automatically unneeded postgresql schema migrations

alexander-schranz opened this issue · 1 comments

There is an issue in doctrine migration which add some unexpected schema migrations in the down migration: doctrine/dbal#1110:

In my project it did contain the follwing:

Bildschirmfoto 2023-04-21 um 16 07 37

        $this->addSql('CREATE SCHEMA metric_helpers');
        $this->addSql('CREATE SCHEMA user_management');
        $this->addSql('CREATE SCHEMA public');

Think rector could be used to make sure this addSql never exists.

This sounds like a valid idea! Feel free to send PR with such a rule 👍

Closing as accepted to avoid keep issue tracker focus on unclear issues that needs our attention.