{"action":"created","comment":{"url":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/comments/29278637","id":29278637,"diff_hunk":"@@ -40,7 +40,7 @@ func (p Postgres) MigrationLogDeleteSql() string {\n type Mysql struct{}\n \n func (m Mysql) SelectMigrationTableSql() string {\n-\treturn \"SELECT table_name FROM information_schema.tables WHERE table_name = ?\"\n+\treturn \"SELECT table_name FROM information_schema.tables WHERE table_name = ? AND table_schema = ?\"","path":"db.go","position":14,"original_position":14,"commit_id":"c23e3aded0f2c10c7d855a50f152abd9b343e9ae","original_commit_id":"c23e3aded0f2c10c7d855a50f152abd9b343e9ae","user":{"login":"rogerclermont","id":7954233,"avatar_url":"https://avatars.githubusercontent.com/u/7954233?v=3","gravatar_id":"","url":"https://api.github.com/users/rogerclermont","html_url":"https://github.com/rogerclermont","followers_url":"https://api.github.com/users/rogerclermont/followers","following_url":"https://api.github.com/users/rogerclermont/following{/other_user}","gists_url":"https://api.github.com/users/rogerclermont/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerclermont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerclermont/subscriptions","organizations_url":"https://api.github.com/users/rogerclermont/orgs","repos_url":"https://api.github.com/users/rogerclermont/repos","events_url":"https://api.github.com/users/rogerclermont/events{/privacy}","received_events_url":"https://api.github.com/users/rogerclermont/received_events","type":"User","site_admin":false},"body":"Though the connection points to a given database, the information_schema table itself is global, and not tied to the given db.\r\n\r\nFrom the page you linked above:\r\n\r\n> For a query that is limited to a specific constant table name, checks need be made only for the named table within the corresponding database directory. Example:\r\n\r\n> SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES\r\n> WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME = 't1';","created_at":"2015-04-28T19:21:20Z","updated_at":"2015-04-28T19:21:20Z","html_url":"https://github.com/DavidHuie/gomigrate/pull/8#discussion_r29278637","pull_request_url":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/comments/29278637"},"html":{"href":"https://github.com/DavidHuie/gomigrate/pull/8#discussion_r29278637"},"pull_request":{"href":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/8","id":33735803,"html_url":"https://github.com/DavidHuie/gomigrate/pull/8","diff_url":"https://github.com/DavidHuie/gomigrate/pull/8.diff","patch_url":"https://github.com/DavidHuie/gomigrate/pull/8.patch","issue_url":"https://api.github.com/repos/DavidHuie/gomigrate/issues/8","number":8,"state":"open","locked":false,"title":"Isolate migrations table check to a given schema instead of server-wide","user":{"login":"rogerclermont","id":7954233,"avatar_url":"https://avatars.githubusercontent.com/u/7954233?v=3","gravatar_id":"","url":"https://api.github.com/users/rogerclermont","html_url":"https://github.com/rogerclermont","followers_url":"https://api.github.com/users/rogerclermont/followers","following_url":"https://api.github.com/users/rogerclermont/following{/other_user}","gists_url":"https://api.github.com/users/rogerclermont/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerclermont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerclermont/subscriptions","organizations_url":"https://api.github.com/users/rogerclermont/orgs","repos_url":"https://api.github.com/users/rogerclermont/repos","events_url":"https://api.github.com/users/rogerclermont/events{/privacy}","received_events_url":"https://api.github.com/users/rogerclermont/received_events","type":"User","site_admin":false},"body":"As-is, testing for the existence of the gomigrate migrations table isn't isolated to a given schema, and is instead scoped server-wide.  This presents a problem when there are multiple database schemas on a given server, all being managed via gomigrate, as the 'table exists' test will succeed, but the migration will fail because the migrations table doesn't actually exist in the target schema.\r\n\r\nThis PR isolates the migrations table existence check to the given schema, thus offering the ability to use gomigrate for schema management for multiple schemas under a given server.","created_at":"2015-04-21T07:39:41Z","updated_at":"2015-04-28T19:21:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ac7be7a9a0d323336913f43560846a034d13537","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/8/commits","review_comments_url":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/8/comments","review_comment_url":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DavidHuie/gomigrate/issues/8/comments","statuses_url":"https://api.github.com/repos/DavidHuie/gomigrate/statuses/c23e3aded0f2c10c7d855a50f152abd9b343e9ae","head":{"label":"rogerclermont:master","ref":"master","sha":"c23e3aded0f2c10c7d855a50f152abd9b343e9ae","user":{"login":"rogerclermont","id":7954233,"avatar_url":"https://avatars.githubusercontent.com/u/7954233?v=3","gravatar_id":"","url":"https://api.github.com/users/rogerclermont","html_url":"https://github.com/rogerclermont","followers_url":"https://api.github.com/users/rogerclermont/followers","following_url":"https://api.github.com/users/rogerclermont/following{/other_user}","gists_url":"https://api.github.com/users/rogerclermont/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerclermont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerclermont/subscriptions","organizations_url":"https://api.github.com/users/rogerclermont/orgs","repos_url":"https://api.github.com/users/rogerclermont/repos","events_url":"https://api.github.com/users/rogerclermont/events{/privacy}","received_events_url":"https://api.github.com/users/rogerclermont/received_events","type":"User","site_admin":false},"repo":{"id":34310865,"name":"gomigrate","full_name":"rogerclermont/gomigrate","owner":{"login":"rogerclermont","id":7954233,"avatar_url":"https://avatars.githubusercontent.com/u/7954233?v=3","gravatar_id":"","url":"https://api.github.com/users/rogerclermont","html_url":"https://github.com/rogerclermont","followers_url":"https://api.github.com/users/rogerclermont/followers","following_url":"https://api.github.com/users/rogerclermont/following{/other_user}","gists_url":"https://api.github.com/users/rogerclermont/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerclermont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerclermont/subscriptions","organizations_url":"https://api.github.com/users/rogerclermont/orgs","repos_url":"https://api.github.com/users/rogerclermont/repos","events_url":"https://api.github.com/users/rogerclermont/events{/privacy}","received_events_url":"https://api.github.com/users/rogerclermont/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rogerclermont/gomigrate","description":"A SQL database migration toolkit in Golang","fork":true,"url":"https://api.github.com/repos/rogerclermont/gomigrate","forks_url":"https://api.github.com/repos/rogerclermont/gomigrate/forks","keys_url":"https://api.github.com/repos/rogerclermont/gomigrate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rogerclermont/gomigrate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rogerclermont/gomigrate/teams","hooks_url":"https://api.github.com/repos/rogerclermont/gomigrate/hooks","issue_events_url":"https://api.github.com/repos/rogerclermont/gomigrate/issues/events{/number}","events_url":"https://api.github.com/repos/rogerclermont/gomigrate/events","assignees_url":"https://api.github.com/repos/rogerclermont/gomigrate/assignees{/user}","branches_url":"https://api.github.com/repos/rogerclermont/gomigrate/branches{/branch}","tags_url":"https://api.github.com/repos/rogerclermont/gomigrate/tags","blobs_url":"https://api.github.com/repos/rogerclermont/gomigrate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rogerclermont/gomigrate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rogerclermont/gomigrate/git/refs{/sha}","trees_url":"https://api.github.com/repos/rogerclermont/gomigrate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rogerclermont/gomigrate/statuses/{sha}","languages_url":"https://api.github.com/repos/rogerclermont/gomigrate/languages","stargazers_url":"https://api.github.com/repos/rogerclermont/gomigrate/stargazers","contributors_url":"https://api.github.com/repos/rogerclermont/gomigrate/contributors","subscribers_url":"https://api.github.com/repos/rogerclermont/gomigrate/subscribers","subscription_url":"https://api.github.com/repos/rogerclermont/gomigrate/subscription","commits_url":"https://api.github.com/repos/rogerclermont/gomigrate/commits{/sha}","git_commits_url":"https://api.github.com/repos/rogerclermont/gomigrate/git/commits{/sha}","comments_url":"https://api.github.com/repos/rogerclermont/gomigrate/comments{/number}","issue_comment_url":"https://api.github.com/repos/rogerclermont/gomigrate/issues/comments{/number}","contents_url":"https://api.github.com/repos/rogerclermont/gomigrate/contents/{+path}","compare_url":"https://api.github.com/repos/rogerclermont/gomigrate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rogerclermont/gomigrate/merges","archive_url":"https://api.github.com/repos/rogerclermont/gomigrate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rogerclermont/gomigrate/downloads","issues_url":"https://api.github.com/repos/rogerclermont/gomigrate/issues{/number}","pulls_url":"https://api.github.com/repos/rogerclermont/gomigrate/pulls{/number}","milestones_url":"https://api.github.com/repos/rogerclermont/gomigrate/milestones{/number}","notifications_url":"https://api.github.com/repos/rogerclermont/gomigrate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rogerclermont/gomigrate/labels{/name}","releases_url":"https://api.github.com/repos/rogerclermont/gomigrate/releases{/id}","created_at":"2015-04-21T07:17:04Z","updated_at":"2015-04-21T08:36:12Z","pushed_at":"2015-04-21T08:36:12Z","git_url":"git://github.com/rogerclermont/gomigrate.git","ssh_url":"git@github.com:rogerclermont/gomigrate.git","clone_url":"https://github.com/rogerclermont/gomigrate.git","svn_url":"https://github.com/rogerclermont/gomigrate","homepage":"","size":130,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"DavidHuie:master","ref":"master","sha":"cfb6d067cc41d95acfa2e5f496dd236346a8175e","user":{"login":"DavidHuie","id":604326,"avatar_url":"https://avatars.githubusercontent.com/u/604326?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidHuie","html_url":"https://github.com/DavidHuie","followers_url":"https://api.github.com/users/DavidHuie/followers","following_url":"https://api.github.com/users/DavidHuie/following{/other_user}","gists_url":"https://api.github.com/users/DavidHuie/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidHuie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidHuie/subscriptions","organizations_url":"https://api.github.com/users/DavidHuie/orgs","repos_url":"https://api.github.com/users/DavidHuie/repos","events_url":"https://api.github.com/users/DavidHuie/events{/privacy}","received_events_url":"https://api.github.com/users/DavidHuie/received_events","type":"User","site_admin":false},"repo":{"id":21778690,"name":"gomigrate","full_name":"DavidHuie/gomigrate","owner":{"login":"DavidHuie","id":604326,"avatar_url":"https://avatars.githubusercontent.com/u/604326?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidHuie","html_url":"https://github.com/DavidHuie","followers_url":"https://api.github.com/users/DavidHuie/followers","following_url":"https://api.github.com/users/DavidHuie/following{/other_user}","gists_url":"https://api.github.com/users/DavidHuie/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidHuie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidHuie/subscriptions","organizations_url":"https://api.github.com/users/DavidHuie/orgs","repos_url":"https://api.github.com/users/DavidHuie/repos","events_url":"https://api.github.com/users/DavidHuie/events{/privacy}","received_events_url":"https://api.github.com/users/DavidHuie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DavidHuie/gomigrate","description":"A SQL database migration toolkit in Golang","fork":false,"url":"https://api.github.com/repos/DavidHuie/gomigrate","forks_url":"https://api.github.com/repos/DavidHuie/gomigrate/forks","keys_url":"https://api.github.com/repos/DavidHuie/gomigrate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DavidHuie/gomigrate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DavidHuie/gomigrate/teams","hooks_url":"https://api.github.com/repos/DavidHuie/gomigrate/hooks","issue_events_url":"https://api.github.com/repos/DavidHuie/gomigrate/issues/events{/number}","events_url":"https://api.github.com/repos/DavidHuie/gomigrate/events","assignees_url":"https://api.github.com/repos/DavidHuie/gomigrate/assignees{/user}","branches_url":"https://api.github.com/repos/DavidHuie/gomigrate/branches{/branch}","tags_url":"https://api.github.com/repos/DavidHuie/gomigrate/tags","blobs_url":"https://api.github.com/repos/DavidHuie/gomigrate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DavidHuie/gomigrate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DavidHuie/gomigrate/git/refs{/sha}","trees_url":"https://api.github.com/repos/DavidHuie/gomigrate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DavidHuie/gomigrate/statuses/{sha}","languages_url":"https://api.github.com/repos/DavidHuie/gomigrate/languages","stargazers_url":"https://api.github.com/repos/DavidHuie/gomigrate/stargazers","contributors_url":"https://api.github.com/repos/DavidHuie/gomigrate/contributors","subscribers_url":"https://api.github.com/repos/DavidHuie/gomigrate/subscribers","subscription_url":"https://api.github.com/repos/DavidHuie/gomigrate/subscription","commits_url":"https://api.github.com/repos/DavidHuie/gomigrate/commits{/sha}","git_commits_url":"https://api.github.com/repos/DavidHuie/gomigrate/git/commits{/sha}","comments_url":"https://api.github.com/repos/DavidHuie/gomigrate/comments{/number}","issue_comment_url":"https://api.github.com/repos/DavidHuie/gomigrate/issues/comments{/number}","contents_url":"https://api.github.com/repos/DavidHuie/gomigrate/contents/{+path}","compare_url":"https://api.github.com/repos/DavidHuie/gomigrate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DavidHuie/gomigrate/merges","archive_url":"https://api.github.com/repos/DavidHuie/gomigrate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DavidHuie/gomigrate/downloads","issues_url":"https://api.github.com/repos/DavidHuie/gomigrate/issues{/number}","pulls_url":"https://api.github.com/repos/DavidHuie/gomigrate/pulls{/number}","milestones_url":"https://api.github.com/repos/DavidHuie/gomigrate/milestones{/number}","notifications_url":"https://api.github.com/repos/DavidHuie/gomigrate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DavidHuie/gomigrate/labels{/name}","releases_url":"https://api.github.com/repos/DavidHuie/gomigrate/releases{/id}","created_at":"2014-07-12T23:25:00Z","updated_at":"2015-04-26T16:38:19Z","pushed_at":"2015-04-21T08:36:12Z","git_url":"git://github.com/DavidHuie/gomigrate.git","ssh_url":"git@github.com:DavidHuie/gomigrate.git","clone_url":"https://github.com/DavidHuie/gomigrate.git","svn_url":"https://github.com/DavidHuie/gomigrate","homepage":"","size":564,"stargazers_count":20,"watchers_count":20,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/8"},"html":{"href":"https://github.com/DavidHuie/gomigrate/pull/8"},"issue":{"href":"https://api.github.com/repos/DavidHuie/gomigrate/issues/8"},"comments":{"href":"https://api.github.com/repos/DavidHuie/gomigrate/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DavidHuie/gomigrate/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/DavidHuie/gomigrate/statuses/c23e3aded0f2c10c7d855a50f152abd9b343e9ae"}}}}