{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/64790828","id":64790828,"diff_hunk":"@@ -991,16 +991,27 @@ def dump_schema_information #:nodoc:\n \n       def insert_versions_sql(versions) # :nodoc:\n         sm_table = ActiveRecord::Migrator.schema_migrations_table_name\n-\n         if supports_multi_insert?\n           sql = \"INSERT INTO #{sm_table} (version) VALUES \"\n           sql << versions.map {|v| \"('#{v}')\" }.join(', ')\n           sql << \";\\n\\n\"\n           sql\n         else\n           versions.map { |version|\n-            \"INSERT INTO #{sm_table} (version) VALUES ('#{version}');\"\n-          }.join \"\\n\\n\"\n+            \"INSERT INTO #{sm_table} (version) VALUES ('#{version}');\\n\\n\"\n+          }.join \"\"\n+        end\n+      end\n+\n+      def execute_multi_insert(sql)\n+        if supports_multi_insert?\n+          execute sql\n+        else\n+          # executing separately because old versions of sqlite3 can't reliably execute multiple statements at once\n+          statements = sql.split(';').select{|i| i.present? } \n+          statements.each do |statement|\n+            execute \"#{statement};\"","path":"activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb","position":35,"original_position":35,"commit_id":"3b8fdc7fbd105677824281f48e35e301866583df","original_commit_id":"3b8fdc7fbd105677824281f48e35e301866583df","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":"No need string interpolation. `execute statement`.","created_at":"2016-05-26T17:56:40Z","updated_at":"2016-05-26T17:56:40Z","html_url":"https://github.com/rails/rails/pull/25016#discussion_r64790828","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/25016","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/64790828"},"html":{"href":"https://github.com/rails/rails/pull/25016#discussion_r64790828"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/25016"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/25016","id":70052821,"html_url":"https://github.com/rails/rails/pull/25016","diff_url":"https://github.com/rails/rails/pull/25016.diff","patch_url":"https://github.com/rails/rails/pull/25016.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/25016","number":25016,"state":"open","locked":false,"title":"using same regex for identifying verions for running migrations and schema loading","user":{"login":"onomojo","id":8988,"avatar_url":"https://avatars.githubusercontent.com/u/8988?v=3","gravatar_id":"","url":"https://api.github.com/users/onomojo","html_url":"https://github.com/onomojo","followers_url":"https://api.github.com/users/onomojo/followers","following_url":"https://api.github.com/users/onomojo/following{/other_user}","gists_url":"https://api.github.com/users/onomojo/gists{/gist_id}","starred_url":"https://api.github.com/users/onomojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onomojo/subscriptions","organizations_url":"https://api.github.com/users/onomojo/orgs","repos_url":"https://api.github.com/users/onomojo/repos","events_url":"https://api.github.com/users/onomojo/events{/privacy}","received_events_url":"https://api.github.com/users/onomojo/received_events","type":"User","site_admin":false},"body":"Currently rails migrations use a different regex than schema loading for identifying migrations to be run. See: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/migration.rb#L1070\r\n\r\nThis pull request makes schema loading use the same regex so that loading the schema behaves the same as running migrations.\r\n\r\nAs a positive side effect, you can now organize your old database migrations into subdirectories without it completely breaking everything.\r\n","created_at":"2016-05-13T20:22:30Z","updated_at":"2016-05-26T17:56:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"563c9a307e9670377d002f56afcec42b7eedcdb5","assignee":{"login":"matthewd","id":1034,"avatar_url":"https://avatars.githubusercontent.com/u/1034?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewd","html_url":"https://github.com/matthewd","followers_url":"https://api.github.com/users/matthewd/followers","following_url":"https://api.github.com/users/matthewd/following{/other_user}","gists_url":"https://api.github.com/users/matthewd/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewd/subscriptions","organizations_url":"https://api.github.com/users/matthewd/orgs","repos_url":"https://api.github.com/users/matthewd/repos","events_url":"https://api.github.com/users/matthewd/events{/privacy}","received_events_url":"https://api.github.com/users/matthewd/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/25016/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/25016/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/25016/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/3b8fdc7fbd105677824281f48e35e301866583df","head":{"label":"onomojo:master","ref":"master","sha":"3b8fdc7fbd105677824281f48e35e301866583df","user":{"login":"onomojo","id":8988,"avatar_url":"https://avatars.githubusercontent.com/u/8988?v=3","gravatar_id":"","url":"https://api.github.com/users/onomojo","html_url":"https://github.com/onomojo","followers_url":"https://api.github.com/users/onomojo/followers","following_url":"https://api.github.com/users/onomojo/following{/other_user}","gists_url":"https://api.github.com/users/onomojo/gists{/gist_id}","starred_url":"https://api.github.com/users/onomojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onomojo/subscriptions","organizations_url":"https://api.github.com/users/onomojo/orgs","repos_url":"https://api.github.com/users/onomojo/repos","events_url":"https://api.github.com/users/onomojo/events{/privacy}","received_events_url":"https://api.github.com/users/onomojo/received_events","type":"User","site_admin":false},"repo":{"id":58767830,"name":"rails","full_name":"onomojo/rails","owner":{"login":"onomojo","id":8988,"avatar_url":"https://avatars.githubusercontent.com/u/8988?v=3","gravatar_id":"","url":"https://api.github.com/users/onomojo","html_url":"https://github.com/onomojo","followers_url":"https://api.github.com/users/onomojo/followers","following_url":"https://api.github.com/users/onomojo/following{/other_user}","gists_url":"https://api.github.com/users/onomojo/gists{/gist_id}","starred_url":"https://api.github.com/users/onomojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onomojo/subscriptions","organizations_url":"https://api.github.com/users/onomojo/orgs","repos_url":"https://api.github.com/users/onomojo/repos","events_url":"https://api.github.com/users/onomojo/events{/privacy}","received_events_url":"https://api.github.com/users/onomojo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/onomojo/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/onomojo/rails","forks_url":"https://api.github.com/repos/onomojo/rails/forks","keys_url":"https://api.github.com/repos/onomojo/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/onomojo/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/onomojo/rails/teams","hooks_url":"https://api.github.com/repos/onomojo/rails/hooks","issue_events_url":"https://api.github.com/repos/onomojo/rails/issues/events{/number}","events_url":"https://api.github.com/repos/onomojo/rails/events","assignees_url":"https://api.github.com/repos/onomojo/rails/assignees{/user}","branches_url":"https://api.github.com/repos/onomojo/rails/branches{/branch}","tags_url":"https://api.github.com/repos/onomojo/rails/tags","blobs_url":"https://api.github.com/repos/onomojo/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/onomojo/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/onomojo/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/onomojo/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/onomojo/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/onomojo/rails/languages","stargazers_url":"https://api.github.com/repos/onomojo/rails/stargazers","contributors_url":"https://api.github.com/repos/onomojo/rails/contributors","subscribers_url":"https://api.github.com/repos/onomojo/rails/subscribers","subscription_url":"https://api.github.com/repos/onomojo/rails/subscription","commits_url":"https://api.github.com/repos/onomojo/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/onomojo/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/onomojo/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/onomojo/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/onomojo/rails/contents/{+path}","compare_url":"https://api.github.com/repos/onomojo/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/onomojo/rails/merges","archive_url":"https://api.github.com/repos/onomojo/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/onomojo/rails/downloads","issues_url":"https://api.github.com/repos/onomojo/rails/issues{/number}","pulls_url":"https://api.github.com/repos/onomojo/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/onomojo/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/onomojo/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/onomojo/rails/labels{/name}","releases_url":"https://api.github.com/repos/onomojo/rails/releases{/id}","deployments_url":"https://api.github.com/repos/onomojo/rails/deployments","created_at":"2016-05-13T19:40:24Z","updated_at":"2016-05-13T19:41:28Z","pushed_at":"2016-05-25T18:02:43Z","git_url":"git://github.com/onomojo/rails.git","ssh_url":"git@github.com:onomojo/rails.git","clone_url":"https://github.com/onomojo/rails.git","svn_url":"https://github.com/onomojo/rails","homepage":"http://rubyonrails.org","size":136485,"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":"c5b766a9a20c9dd5bf09e69a7c508f369c2eeea3","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}","deployments_url":"https://api.github.com/repos/rails/rails/deployments","created_at":"2008-04-11T02:19:47Z","updated_at":"2016-05-26T17:46:32Z","pushed_at":"2016-05-26T16:51:01Z","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":342554,"stargazers_count":31312,"watchers_count":31312,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12702,"mirror_url":null,"open_issues_count":991,"forks":12702,"open_issues":991,"watchers":31312,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/25016"},"html":{"href":"https://github.com/rails/rails/pull/25016"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/25016"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/25016/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/25016/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/25016/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/3b8fdc7fbd105677824281f48e35e301866583df"}}}}
{"actor":{"display_login":"kamipo"}}