[Doctrine] #1711: dropConstraint()'s $primary hint in MySQL

5 views
Skip to first unread message

Doctrine

unread,
Dec 2, 2008, 1:51:46 PM12/2/08
to doctri...@googlegroups.com
#1711: dropConstraint()'s $primary hint in MySQL
-----------------------------------+----------------------------------------
Reporter: temp | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone: 1.0.5
Component: Attributes | Version: 1.0.3
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 0
-----------------------------------+----------------------------------------
Shouldn't MySQL override Export's dropConstraint() method to take use of
the $primary flag?

Since it is always
ALTER TABLE whatever DROP PRIMARY KEY

Right now I have to specify "PRIMARY KEY" to the method, but won't this
break compatibility with other databases? Or is this valid for all
databases?

--
Ticket URL: <http://trac.phpdoctrine.org/ticket/1711>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper

Doctrine

unread,
Dec 2, 2008, 1:53:47 PM12/2/08
to doctri...@googlegroups.com
#1711: dropConstraint()'s $primary hint in MySQL
-----------------------------------+----------------------------------------
Reporter: temp | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone: 1.0.5
Component: Attributes | Version: 1.0.3
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 0
-----------------------------------+----------------------------------------

Comment(by temp):

Uhm... even worse, "PRIMARY KEY" as the $constraintName doesn't work:

Error updating schema: SQLSTATE[42000]: Syntax error or access violation:
1064 You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'CONSTRAINT `PRIMARY KEY`'

Any hints on this?

--
Ticket URL: <http://trac.phpdoctrine.org/ticket/1711#comment:1>

Reply all
Reply to author
Forward
0 new messages