8000 [v3] Programmatically filter tables / sql diffs · Issue #1064 · doctrine/migrations · GitHub
[go: up one dir, main page]

Skip to content
[v3] Programmatically filter tables / sql diffs #1064
@ro0NL

Description

@ro0NL

We use 2 migration storages for a single schema. Respectively pre- and post-deploy with independent configuration.

We configured all excluded tables using the bundle's schema_filter option.

Given we have 2 storage tables, the diff always tries to drop one depending on the used configuration.

If we exclude both tables using the schema_filter, the migration itself crashes as Doctine tries to CREATE TABLE every time because it's now unaware of it's existence (i wow'ed at this point ;))

Programmatically filtering tables / generated SQL diffs is VERY hard, AFAIK.

For now i'm extending the SqlGenerator, which seems to work but is internal :( Perhaps expose an interface or dispatch some event?

I also tried defaulting the --filter-expression from console events, but bumped into symfony/symfony#19441 still :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0