Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-353

doctrine:schema:update doesn't understand it doesn't need to run again

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Schema Managers
    • Security Level: All
    • Labels:
      None

      Description

      doctrine:schema:update keeps thinking there is more to do:

      $ php app/console doctrine:schema:update --dump-sql
      ALTER TABLE Account CHANGE guid guid VARCHAR(255) NOT NULL;
      ALTER TABLE Customer CHANGE guid guid VARCHAR(255) NOT NULL, CHANGE authGuid authGuid VARCHAR(255) NOT NULL
      
      $ php app/console doctrine:schema:update --force   
      Updating database schema...
      Database schema updated successfully! "2" queries were executed
      
      $ php app/console doctrine:schema:update --dump-sql
      ALTER TABLE Account CHANGE guid guid VARCHAR(255) NOT NULL;
      ALTER TABLE Customer CHANGE guid guid VARCHAR(255) NOT NULL, CHANGE authGuid authGuid VARCHAR(255) NOT NULL
      

        Activity

        Mark A. Hershberger created issue -
        Christophe Coevoet made changes -
        Field Original Value New Value
        Environment doctrine:schema:update keeps thinking there is more to do:

        $ php app/console doctrine:schema:update --dump-sql
        ALTER TABLE Account CHANGE guid guid VARCHAR(255) NOT NULL;
        ALTER TABLE Customer CHANGE guid guid VARCHAR(255) NOT NULL, CHANGE authGuid authGuid VARCHAR(255) NOT NULL

        $ php app/console doctrine:schema:update --force
        Updating database schema...
        Database schema updated successfully! "2" queries were executed

        $ php app/console doctrine:schema:update --dump-sql
        ALTER TABLE Account CHANGE guid guid VARCHAR(255) NOT NULL;
        ALTER TABLE Customer CHANGE guid guid VARCHAR(255) NOT NULL, CHANGE authGuid authGuid VARCHAR(255) NOT NULL
        Description doctrine:schema:update keeps thinking there is more to do:

        {code}
        $ php app/console doctrine:schema:update --dump-sql
        ALTER TABLE Account CHANGE guid guid VARCHAR(255) NOT NULL;
        ALTER TABLE Customer CHANGE guid guid VARCHAR(255) NOT NULL, CHANGE authGuid authGuid VARCHAR(255) NOT NULL
        {code}

        {code}
        $ php app/console doctrine:schema:update --force
        Updating database schema...
        Database schema updated successfully! "2" queries were executed
        {code}

        {code}
        $ php app/console doctrine:schema:update --dump-sql
        ALTER TABLE Account CHANGE guid guid VARCHAR(255) NOT NULL;
        ALTER TABLE Customer CHANGE guid guid VARCHAR(255) NOT NULL, CHANGE authGuid authGuid VARCHAR(255) NOT NULL
        {code}
        Hide
        Christophe Coevoet added a comment -

        Can you paste your ORM mapping for these fields ?

        Show
        Christophe Coevoet added a comment - Can you paste your ORM mapping for these fields ?
        Hide
        John Robeson added a comment -

        I had the same problem. I used doctrine:mapping:import
        to bootstrap some entities. It generated my
        session entity primary key with a GeneratedValue strategy of
        IDENTITY when it should have been NONE.

        This sounds like the same problem with the string key
        and incorrect GeneratedValue strategy.

        PS: I ran into that doctrine:mapping:import issue
        perhaps a year ago, when i first started playing with doctrine.
        I do not know if it still persists.

        Show
        John Robeson added a comment - I had the same problem. I used doctrine:mapping:import to bootstrap some entities. It generated my session entity primary key with a GeneratedValue strategy of IDENTITY when it should have been NONE. This sounds like the same problem with the string key and incorrect GeneratedValue strategy. PS: I ran into that doctrine:mapping:import issue perhaps a year ago, when i first started playing with doctrine. I do not know if it still persists.
        Marco Pivetta made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        Resolution Incomplete [ 4 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-353, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Mark A. Hershberger
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: