mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-214: schema-tool --complete-update throw PDOException on DROP INDEX #267
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Dec 16, 2009).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user rickdt:
Here is the stack trace
I think the problem is in the Schema Comparator. It generate a DROP for a foreign key index.
If you compare the index definition from database and from metadata you will see that the foreign key index is present only in the definition obtained from database.
Database :
From metadata :
@doctrinebot commented on GitHub (Dec 16, 2009):
Comment created by rickdt:
I take the index definition from DBAL/Schema/Comparator:207
@doctrinebot commented on GitHub (Dec 16, 2009):
Comment created by @beberlei:
Which database platform is this happening on?
@doctrinebot commented on GitHub (Dec 16, 2009):
Comment created by rickdt:
mysql
@doctrinebot commented on GitHub (Dec 19, 2009):
Comment created by @beberlei:
Ok so Mysql creates an index for each foreign key implicitly which is then queryable explicitly.
To fix this the schema comparator "FixSchema" visitor accompanies for that for the MySQL Platform. Do you use your own platform maybe?
@doctrinebot commented on GitHub (Dec 19, 2009):
Comment created by @beberlei:
You could really help me if you could paste the serialized object code for both schema instances for your use-case or a reproduce case.
@doctrinebot commented on GitHub (Dec 21, 2009):
Comment created by rickdt:
Here are the serialized schema you required.
@doctrinebot commented on GitHub (Dec 21, 2009):
Comment created by rickdt:
I only use Doctrine basic feature, no custom platform.
@doctrinebot commented on GitHub (Feb 3, 2010):
Comment created by rickdt:
Can I do anything to help you resolve this issue. This is really a big annoyance not being able to update existing database.
@doctrinebot commented on GitHub (Feb 3, 2010):
Comment created by rickdt:
Attached a test case
Doctrine/Tests/ORM/Functional/Ticket/DDC214Test
@doctrinebot commented on GitHub (Feb 3, 2010):
Comment created by rickdt:
The test case must be run using mysql.
@doctrinebot commented on GitHub (Feb 3, 2010):
Comment created by @beberlei:
hah thats an awesome-ly simple test-case.
thank you very much :-)
@doctrinebot commented on GitHub (Feb 3, 2010):
Comment created by @beberlei:
Yes, i found the issue - however the test-case will not work with me requiring it to have 0 change sqls - there is another bug that is related to not null and default values.
@doctrinebot commented on GitHub (Feb 4, 2010):
Comment created by rickdt:
I did not really intend to do a "clean" unit test. I just wanted allow you reproduce the problem.
Good news you have been able to reproduce the issue.
And again, your great work is really appreciated!
@doctrinebot commented on GitHub (Feb 7, 2010):
Comment created by @beberlei:
This and many more issues have been fixed.
@doctrinebot commented on GitHub (Feb 7, 2010):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Feb 9, 2010):
Comment created by rickdt:
This is VERY VERY VERY Great!!!
I experienced serious perfomance issue with the query (getListTableForeignKeysSql) :
I think this is a bug in mysql server (5.1.37-1ubuntu5).
I changed the query a little bit and it work great :
@doctrinebot commented on GitHub (Feb 9, 2010):
Comment created by @beberlei:
Patched, and speedy again! Thank you very much.
@doctrinebot commented on GitHub (Feb 9, 2010):
Comment created by rickdt:
That was fast!
@doctrinebot commented on GitHub (May 25, 2010):
Comment created by @jwage:
The test for this issue is failing for me under mysql.
Any ideas?
@doctrinebot commented on GitHub (Jun 6, 2010):
Comment created by romanb:
Seems to fail under postgres, too.
@doctrinebot commented on GitHub (Dec 13, 2015):
Imported 1 attachments from Jira into https://gist.github.com/547fce46a528d6137bc7