Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-474

SchemaManager / Connection on PostgreSQL platform does not respect filterExpression for sequences

    Details

    • Type: Bug Bug
    • Status: In Progress
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: Schema Managers
    • Security Level: All
    • Environment:
      Windows & Linux

      Description

      Dear Symfony team,

      the filterExpression on AbstractSchemaManager seems not to work for sequences.

      This only happens under postgres.

      It seems the way the sequences are handled are the culprit: It tries to get min_value etc of sequences without matching sequence names to the filter expression in advance.

      If for example access to the sequences is denied, (Different schema without permissions for the current entity manager), any higher-level ORM operations like generating migration versions fail.

      --------------------- UPDATE

      the context is when using migrations. Positive regexp expressions do not limit the migration to a single schema. eg ^schemaname.$
      Instead, all sequences on the current database are returned.
      When trying to limit a migration to a single schema consecutively this doesn't work.
      We are using a per-schema connection, so this results in a lot of hassle for us.

        Activity

        Hide
        Doctrine Bot added a comment -

        A related Github Pull-Request [GH-546] was closed:
        https://github.com/doctrine/dbal/pull/546

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-546] was closed: https://github.com/doctrine/dbal/pull/546
        Hide
        Steve Müller added a comment -

        Patch supplied in PR: https://github.com/doctrine/dbal/pull/546
        jos de witte, Arnout Standaert, Viktor Sidochenko can you please test if the supplied PR fixes the problem?

        Show
        Steve Müller added a comment - Patch supplied in PR: https://github.com/doctrine/dbal/pull/546 jos de witte , Arnout Standaert , Viktor Sidochenko can you please test if the supplied PR fixes the problem?
        Hide
        Viktor Sidochenko added a comment -

        Will be good. I`m not professional developer to make patches to upstream. So just voted for this issue.

        Show
        Viktor Sidochenko added a comment - Will be good. I`m not professional developer to make patches to upstream. So just voted for this issue.
        Hide
        Arnout Standaert added a comment -

        I haven't gotten around to doing the PR on GitHub yet, I'm not yet too familiar with that.
        I'll try to find some time for this the coming days.

        Show
        Arnout Standaert added a comment - I haven't gotten around to doing the PR on GitHub yet, I'm not yet too familiar with that. I'll try to find some time for this the coming days.
        Hide
        Steve Müller added a comment -

        Viktor Sidochenko because nobody has fixed it yet Feel free to provide a patch on GitHub.

        Show
        Steve Müller added a comment - Viktor Sidochenko because nobody has fixed it yet Feel free to provide a patch on GitHub.

          People

          • Assignee:
            Steve Müller
            Reporter:
            jos de witte
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated: