Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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.