{"action":"closed","issue":{"url":"https://api.github.com/repos/bolt/bolt/issues/7060","repository_url":"https://api.github.com/repos/bolt/bolt","labels_url":"https://api.github.com/repos/bolt/bolt/issues/7060/labels{/name}","comments_url":"https://api.github.com/repos/bolt/bolt/issues/7060/comments","events_url":"https://api.github.com/repos/bolt/bolt/issues/7060/events","html_url":"https://github.com/bolt/bolt/issues/7060","id":263903277,"number":7060,"title":"Bolt fails to install on MySQL with utf8mb4 encoding","user":{"login":"helix84","id":201026,"avatar_url":"https://avatars3.githubusercontent.com/u/201026?v=4","gravatar_id":"","url":"https://api.github.com/users/helix84","html_url":"https://github.com/helix84","followers_url":"https://api.github.com/users/helix84/followers","following_url":"https://api.github.com/users/helix84/following{/other_user}","gists_url":"https://api.github.com/users/helix84/gists{/gist_id}","starred_url":"https://api.github.com/users/helix84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helix84/subscriptions","organizations_url":"https://api.github.com/users/helix84/orgs","repos_url":"https://api.github.com/users/helix84/repos","events_url":"https://api.github.com/users/helix84/events{/privacy}","received_events_url":"https://api.github.com/users/helix84/received_events","type":"User","site_admin":false},"labels":[{"id":756066444,"url":"https://api.github.com/repos/bolt/bolt/labels/stale","name":"stale","color":"D2DAE1","default":false},{"id":392706368,"url":"https://api.github.com/repos/bolt/bolt/labels/upstream%20/%203rd%20party","name":"upstream / 3rd party","color":"C0D4F1","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-10-09T13:53:20Z","updated_at":"2018-02-01T08:04:24Z","closed_at":"2018-02-01T08:04:24Z","author_association":"CONTRIBUTOR","body":"Bolt fails to install on MySQL with utf8mb4 encoding.\r\n\r\n\r\nDetails\r\n-------\r\n\r\n - Relevant Bolt Version: 3.3\r\n - Install type: Zip/tarball install\r\n - PHP version: 7.0\r\n - Used web server: Apache 2.4.18\r\n\r\nReproduction\r\n------------\r\n\r\n### Bug summary\r\n\r\n\r\n\r\n### Specifics\r\n\r\n<!-- \r\n    * Mention the URL where this bug occurs, if applicable\r\n    * What version of Bolt are you using (down to the very last digit!)\r\n    * What method did you use to install Bolt\r\n    * What browser and version you are using\r\n    * Please mention if you've checked it in other browsers as well \r\n    * Please include *full error messages* and *screenshots* if possible\r\n-->\r\n\r\n### Steps to reproduce\r\n\r\n* prepare a MySQL database (MariaDB 10.0.32).\r\n* extract Bolt\r\n* in config.yml, use the following settings:\r\ndatabase:\r\n     driver: mysql\r\n     charset: utf8mb4\r\n     collate: utf8mb4_general_ci\r\n* install Bolt\r\n\r\n### Expected result\r\n\r\nBolt is installed successfully.\r\n\r\n### Actual result\r\n\r\nBolt is installed, all databases tables are created successfully except for bolt_users, which fails to create with the following error:\r\n```Error in query (1071): Specified key was too long; max key length is 767 bytes```\r\nThe error pertains to the following column:\r\n```\r\nCREATE TABLE bolt_users (\r\n...\r\n  email varchar(254) COLLATE utf8mb4_czech_ci NOT NULL,\r\n```\r\n\r\nand is explained e.g. here:\r\nhttps://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes\r\nor here:\r\nhttps://github.com/BoltTranslate/Translate/issues/56#issuecomment-237057436\r\n\r\n### Limitations\r\nOne of the proposed solutions is to set a global mysql variable, which may not be allowed in a shared hosting setting like the one I'm using in production.\r\n```SET @@global.innodb_large_prefix = 1;```\r\n\r\n### Proposed solution\r\nI propose to decrease the column length to fit the utf8mb4 limit, i.e. from varchar(254) to varchar(191).\r\n\r\nAnd, yeah, nobody likes brown M&Ms."}}
{"actor":{"display_login":"stale"}}