Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres - Generate migration only for public schema #549

Open
orangevinz opened this issue Jun 7, 2024 · 0 comments
Open

Postgres - Generate migration only for public schema #549

orangevinz opened this issue Jun 7, 2024 · 0 comments

Comments

@orangevinz
Copy link

I'm using PostgreSQL v16 with extensions such as jobmon and partman.
Each time I run make:migration, it generates a new migration with extensions diffs.

With this configuration

doctrine:
    dbal:
        default_connection:       default
        connections:
            default:
                url: '%env(resolve:DATABASE_URL)%'
                use_savepoints: true
                profiling_collect_backtrace: '%kernel.debug%'
                schema_filter: '~^(?!doctrine_migration_versions$|.*jobmon.*|.*partman.*|.*dblink.*)~'

The generated down method includes:

public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('CREATE SCHEMA partman');
        $this->addSql('CREATE SCHEMA jobmon');
        $this->addSql('CREATE SCHEMA dblink');
        $this->addSql('CREATE SCHEMA public');

How can I restrict migrations to the public schema only ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant