Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1324

Update schema fails to recognize correct schema

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:
      None
    • Environment:
      OSX 10.6.8
      PHP 5.3.4
      Mysql 5.1.43

      Description

      When the primary key is a text string the update:schema command fails to recognize that the database schema is correct, and with every call to update:schema it tries again and again to make the same, unneeded change.

      class BillMethod
      {
      /**

      • @ORM\Id
      • @ORM\Column(type="string", length=50, nullable=false)
      • @ORM\GeneratedValue(strategy="IDENTITY")
        */
        protected $sid;
        ...
        }

      When I run update:schema, I tells me this change is needed.

      ALTER TABLE billmethod CHANGE sid sid VARCHAR(50) NOT NULL;

      But, it's already there.

      mysql> desc billmethod;
      --------------------------------------------+

      Field Type Null Key Default Extra

      --------------------------------------------+

      sid varchar(50) NO PRI NULL  

      ...

      The SQL does nothing, and update:schema tells me that this change still needs to be made.

        Activity

        Adam created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 12908 ] jira-feedback [ 13958 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 13958 ] jira-feedback2 [ 15822 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15822 ] jira-feedback3 [ 18078 ]
        Hide
        Marco Pivetta added a comment -

        Cannot reproduce on current version - was most probably fixed

        Show
        Marco Pivetta added a comment - Cannot reproduce on current version - was most probably fixed
        Marco Pivetta made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        Resolution Invalid [ 6 ]

        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=DDC-1324, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Adam
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: