{"action":"opened","number":18602,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/18602","id":27591271,"html_url":"https://github.com/rails/rails/pull/18602","diff_url":"https://github.com/rails/rails/pull/18602.diff","patch_url":"https://github.com/rails/rails/pull/18602.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/18602","number":18602,"state":"open","locked":false,"title":"Respect the database default charset for `schema_migrations` table.","user":{"login":"kamipo","id":12642,"avatar_url":"https://avatars.githubusercontent.com/u/12642?v=3","gravatar_id":"","url":"https://api.github.com/users/kamipo","html_url":"https://github.com/kamipo","followers_url":"https://api.github.com/users/kamipo/followers","following_url":"https://api.github.com/users/kamipo/following{/other_user}","gists_url":"https://api.github.com/users/kamipo/gists{/gist_id}","starred_url":"https://api.github.com/users/kamipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamipo/subscriptions","organizations_url":"https://api.github.com/users/kamipo/orgs","repos_url":"https://api.github.com/users/kamipo/repos","events_url":"https://api.github.com/users/kamipo/events{/privacy}","received_events_url":"https://api.github.com/users/kamipo/received_events","type":"User","site_admin":false},"body":"The charset of `version` column in `schema_migrations` table is depend\r\non the database default charset and collation rather than encoding of\r\nconnection.\r\n\r\nHow to reproduce:\r\n\r\n```bash\r\n# rails new apps default encoding: utf8\r\n$ rails new foo -d mysql && cd foo\r\n# existing database charset utf8mb4\r\n$ mysql -u root -e \"CREATE DATABASE foo_development CHARACTER SET utf8mb4\"\r\n# create index fails\r\n$ rake db:migrate\r\nrake aborted!\r\nActiveRecord::StatementInvalid: Mysql2::Error: Index column size too large. The maximum column size is 767 bytes.: CREATE UNIQUE INDEX `unique_schema_migrations`  ON `schema_migrations` (`version`)\r\n```\r\n","created_at":"2015-01-19T08:34:49Z","updated_at":"2015-01-19T08:34:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/18602/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/18602/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rails/rails/issues/18602/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/9b5f2912f6a7256ba29392edb6b8ca7becc8b51d","head":{"label":"kamipo:respect_database_charset_and_collation","ref":"respect_database_charset_and_collation","sha":"9b5f2912f6a7256ba29392edb6b8ca7becc8b51d","user":{"login":"kamipo","id":12642,"avatar_url":"https://avatars.githubusercontent.com/u/12642?v=3","gravatar_id":"","url":"https://api.github.com/users/kamipo","html_url":"https://github.com/kamipo","followers_url":"https://api.github.com/users/kamipo/followers","following_url":"https://api.github.com/users/kamipo/following{/other_user}","gists_url":"https://api.github.com/users/kamipo/gists{/gist_id}","starred_url":"https://api.github.com/users/kamipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamipo/subscriptions","organizations_url":"https://api.github.com/users/kamipo/orgs","repos_url":"https://api.github.com/users/kamipo/repos","events_url":"https://api.github.com/users/kamipo/events{/privacy}","received_events_url":"https://api.github.com/users/kamipo/received_events","type":"User","site_admin":false},"repo":{"id":14544189,"name":"rails","full_name":"kamipo/rails","owner":{"login":"kamipo","id":12642,"avatar_url":"https://avatars.githubusercontent.com/u/12642?v=3","gravatar_id":"","url":"https://api.github.com/users/kamipo","html_url":"https://github.com/kamipo","followers_url":"https://api.github.com/users/kamipo/followers","following_url":"https://api.github.com/users/kamipo/following{/other_user}","gists_url":"https://api.github.com/users/kamipo/gists{/gist_id}","starred_url":"https://api.github.com/users/kamipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamipo/subscriptions","organizations_url":"https://api.github.com/users/kamipo/orgs","repos_url":"https://api.github.com/users/kamipo/repos","events_url":"https://api.github.com/users/kamipo/events{/privacy}","received_events_url":"https://api.github.com/users/kamipo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kamipo/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/kamipo/rails","forks_url":"https://api.github.com/repos/kamipo/rails/forks","keys_url":"https://api.github.com/repos/kamipo/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kamipo/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kamipo/rails/teams","hooks_url":"https://api.github.com/repos/kamipo/rails/hooks","issue_events_url":"https://api.github.com/repos/kamipo/rails/issues/events{/number}","events_url":"https://api.github.com/repos/kamipo/rails/events","assignees_url":"https://api.github.com/repos/kamipo/rails/assignees{/user}","branches_url":"https://api.github.com/repos/kamipo/rails/branches{/branch}","tags_url":"https://api.github.com/repos/kamipo/rails/tags","blobs_url":"https://api.github.com/repos/kamipo/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kamipo/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kamipo/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/kamipo/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kamipo/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/kamipo/rails/languages","stargazers_url":"https://api.github.com/repos/kamipo/rails/stargazers","contributors_url":"https://api.github.com/repos/kamipo/rails/contributors","subscribers_url":"https://api.github.com/repos/kamipo/rails/subscribers","subscription_url":"https://api.github.com/repos/kamipo/rails/subscription","commits_url":"https://api.github.com/repos/kamipo/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/kamipo/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/kamipo/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/kamipo/rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/kamipo/rails/contents/{+path}","compare_url":"https://api.github.com/repos/kamipo/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kamipo/rails/merges","archive_url":"https://api.github.com/repos/kamipo/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kamipo/rails/downloads","issues_url":"https://api.github.com/repos/kamipo/rails/issues{/number}","pulls_url":"https://api.github.com/repos/kamipo/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/kamipo/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/kamipo/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kamipo/rails/labels{/name}","releases_url":"https://api.github.com/repos/kamipo/rails/releases{/id}","created_at":"2013-11-20T02:14:22Z","updated_at":"2014-03-12T13:52:06Z","pushed_at":"2015-01-19T08:32:14Z","git_url":"git://github.com/kamipo/rails.git","ssh_url":"git@github.com:kamipo/rails.git","clone_url":"https://github.com/kamipo/rails.git","svn_url":"https://github.com/kamipo/rails","homepage":"http://rubyonrails.org","size":121541,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"cf01d36f020f06992cb3d7e6d818137166a78fcb","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","created_at":"2008-04-11T02:19:47Z","updated_at":"2015-01-19T08:22:18Z","pushed_at":"2015-01-19T08:22:18Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":378459,"stargazers_count":24629,"watchers_count":24629,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9523,"mirror_url":null,"open_issues_count":767,"forks":9523,"open_issues":767,"watchers":24629,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/18602"},"html":{"href":"https://github.com/rails/rails/pull/18602"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/18602"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/18602/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/18602/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/18602/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/9b5f2912f6a7256ba29392edb6b8ca7becc8b51d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":21,"deletions":5,"changed_files":3}}