{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/834","repository_url":"https://api.github.com/repos/doctrine/DoctrineBundle","labels_url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/834/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/834/comments","events_url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/834/events","html_url":"https://github.com/doctrine/DoctrineBundle/issues/834","id":341523561,"node_id":"MDU6SXNzdWUzNDE1MjM1NjE=","number":834,"title":"Better error message when index keys surpass the 767 limit","user":{"login":"javiereguiluz","id":73419,"node_id":"MDQ6VXNlcjczNDE5","avatar_url":"https://avatars3.githubusercontent.com/u/73419?v=4","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-16T13:40:48Z","updated_at":"2018-07-16T16:40:36Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If the following conditions met:\r\n\r\n* You are using `utf8mb4`\r\n* You set `unique=true` in a column\r\n* That column is a string with more than 190 character length (which happens when you don't define the length and 255 is used by default)\r\n\r\nYou'll see this cryptic error message:\r\n\r\n```\r\n[PDOException] SQLSTATE[42000]: Syntax error or access violation:\r\n1071 Specified key was too long; max key length is 767 bytes\r\n```\r\n\r\nThis is [a well-known MySQL restriction](https://dev.mysql.com/doc/refman/5.6/en/innodb-restrictions.html) but maybe we could display a better error message to help users? Example:\r\n\r\n```\r\nWhen using utf8mb4, the length of the unique columns must be 190 or\r\nless but the %s property of the %s entity has a length of %d.\r\n```"},"comment":{"url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/comments/405309376","html_url":"https://github.com/doctrine/DoctrineBundle/issues/834#issuecomment-405309376","issue_url":"https://api.github.com/repos/doctrine/DoctrineBundle/issues/834","id":405309376,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTMwOTM3Ng==","user":{"login":"Majkl578","id":144181,"node_id":"MDQ6VXNlcjE0NDE4MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/144181?v=4","gravatar_id":"","url":"https://api.github.com/users/Majkl578","html_url":"https://github.com/Majkl578","followers_url":"https://api.github.com/users/Majkl578/followers","following_url":"https://api.github.com/users/Majkl578/following{/other_user}","gists_url":"https://api.github.com/users/Majkl578/gists{/gist_id}","starred_url":"https://api.github.com/users/Majkl578/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Majkl578/subscriptions","organizations_url":"https://api.github.com/users/Majkl578/orgs","repos_url":"https://api.github.com/users/Majkl578/repos","events_url":"https://api.github.com/users/Majkl578/events{/privacy}","received_events_url":"https://api.github.com/users/Majkl578/received_events","type":"User","site_admin":false},"created_at":"2018-07-16T16:40:36Z","updated_at":"2018-07-16T16:40:36Z","author_association":"MEMBER","body":"Shouldn't this be reported to [DBAL](https://github.com/doctrine/dbal) instead?"}}
{"actor":{"display_login":"Majkl578"}}