Doctrine Migrations
  1. Doctrine Migrations
  2. DMIG-18

diffing causes lots of false positives (on postgresql)

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      PostgreSQL 9.0

      Description

      I am playing around with the diff tool and noticing that a lot of false positives are generated, like using SERIAL creates Sequences that are not explicitly listed, causing the diff tool to believe that they should be dropped. Or using "array" as a datatype makes the diff tool believe that there was a type change since they are setup as TEXT. now the alter statement then actually specifies to alter it form TEXT to TEXT again.

      I guess the fact is that just more work needs to be put in here and I guess if I want things to improve I should step up, especially if I care about such an "obsure" database as Postresql

        Activity

        Hide
        Finjon Kiang added a comment -

        well... the diff is not reliable currently as all the indexes, constraints were affected and serial, bigserial fields would be replaced using int and bigint...

        Show
        Finjon Kiang added a comment - well... the diff is not reliable currently as all the indexes, constraints were affected and serial, bigserial fields would be replaced using int and bigint...
        Hide
        Finjon Kiang added a comment -

        Currently, sequences won't be dropped when using diff tool (latest version from github downloaded today). But it still drops the default value like 'nextval('xxx_seq')'. As the database wasn't used by doctrine2 only, dropping default value like that caused some problems in my environment.

        Show
        Finjon Kiang added a comment - Currently, sequences won't be dropped when using diff tool (latest version from github downloaded today). But it still drops the default value like 'nextval('xxx_seq')'. As the database wasn't used by doctrine2 only, dropping default value like that caused some problems in my environment.
        Hide
        Lukas Kahwe added a comment -
        Show
        Lukas Kahwe added a comment - likely solved with http://www.doctrine-project.org/jira/browse/DBAL-42
        Hide
        Ilan added a comment -

        I have noticed the same problems when using @GeneratedValue(strategy="IDENTITY").
        Postgres will create a sequence which doctrine does not manage. When running a schema validation doctrine fails because the diff tool
        believes the sequences should not be in the database.
        Same problem when trying to update the schema with --complete, doctrine will run queries to drop the sequences.

        Regards,

        Ilan

        Show
        Ilan added a comment - I have noticed the same problems when using @GeneratedValue(strategy="IDENTITY"). Postgres will create a sequence which doctrine does not manage. When running a schema validation doctrine fails because the diff tool believes the sequences should not be in the database. Same problem when trying to update the schema with --complete, doctrine will run queries to drop the sequences. Regards, Ilan

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Lukas Kahwe
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: