DDC-1324: Update schema fails to recognize correct schema #1939

Closed
doctrinebot opened this Issue Aug 9, 2011 · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user adamk:

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.

@doctrinebot

Comment created by @ocramius:

Cannot reproduce on current version - was most probably fixed

@doctrinebot

Issue was closed with resolution "Invalid"

@Ocramius Ocramius was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment