{"action":"created","issue":{"url":"https://api.github.com/repos/sulu/sulu-standard/issues/689","repository_url":"https://api.github.com/repos/sulu/sulu-standard","labels_url":"https://api.github.com/repos/sulu/sulu-standard/issues/689/labels{/name}","comments_url":"https://api.github.com/repos/sulu/sulu-standard/issues/689/comments","events_url":"https://api.github.com/repos/sulu/sulu-standard/issues/689/events","html_url":"https://github.com/sulu/sulu-standard/issues/689","id":153000355,"number":689,"title":"Issue when upgrading from 1.1 to 1.2","user":{"login":"ollietb","id":342090,"avatar_url":"https://avatars.githubusercontent.com/u/342090?v=3","gravatar_id":"","url":"https://api.github.com/users/ollietb","html_url":"https://github.com/ollietb","followers_url":"https://api.github.com/users/ollietb/followers","following_url":"https://api.github.com/users/ollietb/following{/other_user}","gists_url":"https://api.github.com/users/ollietb/gists{/gist_id}","starred_url":"https://api.github.com/users/ollietb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ollietb/subscriptions","organizations_url":"https://api.github.com/users/ollietb/orgs","repos_url":"https://api.github.com/users/ollietb/repos","events_url":"https://api.github.com/users/ollietb/events{/privacy}","received_events_url":"https://api.github.com/users/ollietb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-04T12:34:31Z","updated_at":"2016-05-04T12:52:39Z","closed_at":null,"body":"| Q | A\r\n| --- | ---\r\n| Bug? | yes\r\n| New Feature? | no\r\n| Sulu Version | 1.2.1\r\n| Browser Version | N/A\r\n\r\n#### Actual Behavior\r\n\r\nWhen upgrading and running the doctrine:schema:update command like in the UPGRADE.md, I get an error regarding foreign key contraints. This happens on my local environment as well as the live instance of our site. The error is \r\n```\r\n[Doctrine\\DBAL\\Exception\\DriverException]\r\n  An exception occurred while executing 'ALTER TABLE se_users CHANGE idContacts idContacts INT NOT NULL':\r\n  SQLSTATE[HY000]: General error: 1832 Cannot change column 'idContacts': used in a foreign key constraint 'FK_B10AC28E60E33F28'\r\n```\r\nThere are no users with `se_user.idContacts IS NULL`\r\n\r\n#### Expected Behavior\r\n\r\nThe database to update without an error\r\n\r\n#### Steps to Reproduce\r\n\r\nHave a working site with 1.1. Upgrade to 1.2 and run the command `app/console doctrine:schema:update --force`\r\n\r\n#### Possible Solutions\r\n\r\nUse migrations instead of forcing the schema?\r\nI had to manually remove the foreign key and run the schema update command. Maybe this should be documented in the upgrade notes?\r\n"},"comment":{"url":"https://api.github.com/repos/sulu/sulu-standard/issues/comments/216853328","html_url":"https://github.com/sulu/sulu-standard/issues/689#issuecomment-216853328","issue_url":"https://api.github.com/repos/sulu/sulu-standard/issues/689","id":216853328,"user":{"login":"alexander-schranz","id":1698337,"avatar_url":"https://avatars.githubusercontent.com/u/1698337?v=3","gravatar_id":"","url":"https://api.github.com/users/alexander-schranz","html_url":"https://github.com/alexander-schranz","followers_url":"https://api.github.com/users/alexander-schranz/followers","following_url":"https://api.github.com/users/alexander-schranz/following{/other_user}","gists_url":"https://api.github.com/users/alexander-schranz/gists{/gist_id}","starred_url":"https://api.github.com/users/alexander-schranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexander-schranz/subscriptions","organizations_url":"https://api.github.com/users/alexander-schranz/orgs","repos_url":"https://api.github.com/users/alexander-schranz/repos","events_url":"https://api.github.com/users/alexander-schranz/events{/privacy}","received_events_url":"https://api.github.com/users/alexander-schranz/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T12:52:38Z","updated_at":"2016-05-04T12:52:38Z","body":"@ollietb which DB and version?"}}