{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/dbal/issues/2576","repository_url":"https://api.github.com/repos/doctrine/dbal","labels_url":"https://api.github.com/repos/doctrine/dbal/issues/2576/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/dbal/issues/2576/comments","events_url":"https://api.github.com/repos/doctrine/dbal/issues/2576/events","html_url":"https://github.com/doctrine/dbal/issues/2576","id":195331319,"node_id":"MDU6SXNzdWUxOTUzMzEzMTk=","number":2576,"title":"Update schema has 2 time the same \"drop foreign key\"","user":{"login":"Nikoms","id":375867,"node_id":"MDQ6VXNlcjM3NTg2Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/375867?v=4","gravatar_id":"","url":"https://api.github.com/users/Nikoms","html_url":"https://github.com/Nikoms","followers_url":"https://api.github.com/users/Nikoms/followers","following_url":"https://api.github.com/users/Nikoms/following{/other_user}","gists_url":"https://api.github.com/users/Nikoms/gists{/gist_id}","starred_url":"https://api.github.com/users/Nikoms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nikoms/subscriptions","organizations_url":"https://api.github.com/users/Nikoms/orgs","repos_url":"https://api.github.com/users/Nikoms/repos","events_url":"https://api.github.com/users/Nikoms/events{/privacy}","received_events_url":"https://api.github.com/users/Nikoms/received_events","type":"User","site_admin":false},"labels":[{"id":225630643,"node_id":"MDU6TGFiZWwyMjU2MzA2NDM=","url":"https://api.github.com/repos/doctrine/dbal/labels/Bug","name":"Bug","color":"e11d21","default":false},{"id":309180183,"node_id":"MDU6TGFiZWwzMDkxODAxODM=","url":"https://api.github.com/repos/doctrine/dbal/labels/Foreign%20Keys","name":"Foreign Keys","color":"ffffff","default":false},{"id":225630352,"node_id":"MDU6TGFiZWwyMjU2MzAzNTI=","url":"https://api.github.com/repos/doctrine/dbal/labels/Missing%20Tests","name":"Missing Tests","color":"eb6420","default":false},{"id":308743224,"node_id":"MDU6TGFiZWwzMDg3NDMyMjQ=","url":"https://api.github.com/repos/doctrine/dbal/labels/MySQL","name":"MySQL","color":"c7def8","default":false},{"id":308809370,"node_id":"MDU6TGFiZWwzMDg4MDkzNzA=","url":"https://api.github.com/repos/doctrine/dbal/labels/Schema","name":"Schema","color":"bfe5bf","default":false},{"id":308836049,"node_id":"MDU6TGFiZWwzMDg4MzYwNDk=","url":"https://api.github.com/repos/doctrine/dbal/labels/Schema%20Comparison","name":"Schema Comparison","color":"ffffff","default":false},{"id":308744337,"node_id":"MDU6TGFiZWwzMDg3NDQzMzc=","url":"https://api.github.com/repos/doctrine/dbal/labels/pdo_mysql","name":"pdo_mysql","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-12-13T18:28:35Z","updated_at":"2018-08-01T10:39:43Z","closed_at":null,"author_association":"NONE","body":"Hello!\r\n\r\nOn mysql, I have this issue with 2.5.5.\r\n\r\nWhen I removed a Foreign key to a simple int, I get the \"drop\" twice.\r\n\r\nALTER TABLE my_table DROP FOREIGN KEY FK_CE1415A19EB6921;\r\nALTER TABLE my_table DROP FOREIGN KEY FK_CE1415A19EB6921;\r\n\r\nI already checked a bit.\r\nAnd I see here that we merge some sqls: doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php:674\r\n\r\n$this->getPreAlterTableAlterIndexForeignKeySQL($diff)\r\nAND\r\nparent::getPreAlterTableIndexForeignKeySQL($diff),\r\n\r\nboth return the \"ALTER TABLE ... DROP FOREIGN FEY\"\r\n\r\nMaybe one of them should not return the \"ALTER TABLE\", but which one? or I guess we should add a array_unique? \r\n\r\nIf someone tell me, i can make a PR :)\r\n"},"comment":{"url":"https://api.github.com/repos/doctrine/dbal/issues/comments/409531809","html_url":"https://github.com/doctrine/dbal/issues/2576#issuecomment-409531809","issue_url":"https://api.github.com/repos/doctrine/dbal/issues/2576","id":409531809,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTUzMTgwOQ==","user":{"login":"websmurf","id":4027236,"node_id":"MDQ6VXNlcjQwMjcyMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4027236?v=4","gravatar_id":"","url":"https://api.github.com/users/websmurf","html_url":"https://github.com/websmurf","followers_url":"https://api.github.com/users/websmurf/followers","following_url":"https://api.github.com/users/websmurf/following{/other_user}","gists_url":"https://api.github.com/users/websmurf/gists{/gist_id}","starred_url":"https://api.github.com/users/websmurf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/websmurf/subscriptions","organizations_url":"https://api.github.com/users/websmurf/orgs","repos_url":"https://api.github.com/users/websmurf/repos","events_url":"https://api.github.com/users/websmurf/events{/privacy}","received_events_url":"https://api.github.com/users/websmurf/received_events","type":"User","site_admin":false},"created_at":"2018-08-01T10:39:43Z","updated_at":"2018-08-01T10:39:43Z","author_association":"NONE","body":"Rebased it and fixed a few small styling issues that the last step complained about."}}
{"actor":{"display_login":"websmurf"}}