{"action":"created","comment":{"url":"https://api.github.com/repos/elixir-lang/ecto/pulls/comments/42935146","id":42935146,"diff_hunk":"@@ -658,4 +659,17 @@ defmodule Ecto.Migration do\n   defp validate_type!(%Reference{} = reference) do\n     reference\n   end\n+\n+  def prefix(opts_prefix) when is_nil(opts_prefix) do","path":"lib/ecto/migration.ex","position":86,"original_position":85,"commit_id":"fc8dc708f79e9dcb33a2d19e72c5602b66089aad","original_commit_id":"b2ce5f4806b9d9d03f0b9518a34885ac882f8ef7","user":{"login":"Dania02525","id":11240307,"avatar_url":"https://avatars.githubusercontent.com/u/11240307?v=3","gravatar_id":"","url":"https://api.github.com/users/Dania02525","html_url":"https://github.com/Dania02525","followers_url":"https://api.github.com/users/Dania02525/followers","following_url":"https://api.github.com/users/Dania02525/following{/other_user}","gists_url":"https://api.github.com/users/Dania02525/gists{/gist_id}","starred_url":"https://api.github.com/users/Dania02525/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dania02525/subscriptions","organizations_url":"https://api.github.com/users/Dania02525/orgs","repos_url":"https://api.github.com/users/Dania02525/repos","events_url":"https://api.github.com/users/Dania02525/events{/privacy}","received_events_url":"https://api.github.com/users/Dania02525/received_events","type":"User","site_admin":false},"body":"We can make these private if this can be improved to allow the table to be prefixed before being sent into runner:\r\n```elixir\r\ndefmacro alter(object, do: block) do\r\n    quote do\r\n      table = %Table{} = unquote(object)\r\n      Runner.start_command({:alter, %{table | prefix: prefix(table.prefix)}})\r\n      unquote(block)\r\n      Runner.end_command\r\n    end\r\n  end\r\n```\r\nany ideas?","created_at":"2015-10-24T15:40:26Z","updated_at":"2015-10-24T15:40:26Z","html_url":"https://github.com/elixir-lang/ecto/pull/1047#discussion_r42935146","pull_request_url":"https://api.github.com/repos/elixir-lang/ecto/pulls/1047","_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/ecto/pulls/comments/42935146"},"html":{"href":"https://github.com/elixir-lang/ecto/pull/1047#discussion_r42935146"},"pull_request":{"href":"https://api.github.com/repos/elixir-lang/ecto/pulls/1047"}}},"pull_request":{"url":"https://api.github.com/repos/elixir-lang/ecto/pulls/1047","id":48590896,"html_url":"https://github.com/elixir-lang/ecto/pull/1047","diff_url":"https://github.com/elixir-lang/ecto/pull/1047.diff","patch_url":"https://github.com/elixir-lang/ecto/pull/1047.patch","issue_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1047","number":1047,"state":"open","locked":false,"title":"Migration manager","user":{"login":"Dania02525","id":11240307,"avatar_url":"https://avatars.githubusercontent.com/u/11240307?v=3","gravatar_id":"","url":"https://api.github.com/users/Dania02525","html_url":"https://github.com/Dania02525","followers_url":"https://api.github.com/users/Dania02525/followers","following_url":"https://api.github.com/users/Dania02525/following{/other_user}","gists_url":"https://api.github.com/users/Dania02525/gists{/gist_id}","starred_url":"https://api.github.com/users/Dania02525/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dania02525/subscriptions","organizations_url":"https://api.github.com/users/Dania02525/orgs","repos_url":"https://api.github.com/users/Dania02525/repos","events_url":"https://api.github.com/users/Dania02525/events{/privacy}","received_events_url":"https://api.github.com/users/Dania02525/received_events","type":"User","site_admin":false},"body":"Tests passing for migration manager, including stopping itself when no more migrations, and staying alive when still containing migrations.  ","created_at":"2015-10-23T15:03:12Z","updated_at":"2015-10-24T15:40:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"735f4df43296a646585cf781c2dee8417f345bfc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elixir-lang/ecto/pulls/1047/commits","review_comments_url":"https://api.github.com/repos/elixir-lang/ecto/pulls/1047/comments","review_comment_url":"https://api.github.com/repos/elixir-lang/ecto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1047/comments","statuses_url":"https://api.github.com/repos/elixir-lang/ecto/statuses/fc8dc708f79e9dcb33a2d19e72c5602b66089aad","head":{"label":"Dania02525:master","ref":"master","sha":"fc8dc708f79e9dcb33a2d19e72c5602b66089aad","user":{"login":"Dania02525","id":11240307,"avatar_url":"https://avatars.githubusercontent.com/u/11240307?v=3","gravatar_id":"","url":"https://api.github.com/users/Dania02525","html_url":"https://github.com/Dania02525","followers_url":"https://api.github.com/users/Dania02525/followers","following_url":"https://api.github.com/users/Dania02525/following{/other_user}","gists_url":"https://api.github.com/users/Dania02525/gists{/gist_id}","starred_url":"https://api.github.com/users/Dania02525/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dania02525/subscriptions","organizations_url":"https://api.github.com/users/Dania02525/orgs","repos_url":"https://api.github.com/users/Dania02525/repos","events_url":"https://api.github.com/users/Dania02525/events{/privacy}","received_events_url":"https://api.github.com/users/Dania02525/received_events","type":"User","site_admin":false},"repo":{"id":43719948,"name":"ecto","full_name":"Dania02525/ecto","owner":{"login":"Dania02525","id":11240307,"avatar_url":"https://avatars.githubusercontent.com/u/11240307?v=3","gravatar_id":"","url":"https://api.github.com/users/Dania02525","html_url":"https://github.com/Dania02525","followers_url":"https://api.github.com/users/Dania02525/followers","following_url":"https://api.github.com/users/Dania02525/following{/other_user}","gists_url":"https://api.github.com/users/Dania02525/gists{/gist_id}","starred_url":"https://api.github.com/users/Dania02525/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dania02525/subscriptions","organizations_url":"https://api.github.com/users/Dania02525/orgs","repos_url":"https://api.github.com/users/Dania02525/repos","events_url":"https://api.github.com/users/Dania02525/events{/privacy}","received_events_url":"https://api.github.com/users/Dania02525/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dania02525/ecto","description":"A database wrapper and language integrated query for Elixir","fork":true,"url":"https://api.github.com/repos/Dania02525/ecto","forks_url":"https://api.github.com/repos/Dania02525/ecto/forks","keys_url":"https://api.github.com/repos/Dania02525/ecto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dania02525/ecto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dania02525/ecto/teams","hooks_url":"https://api.github.com/repos/Dania02525/ecto/hooks","issue_events_url":"https://api.github.com/repos/Dania02525/ecto/issues/events{/number}","events_url":"https://api.github.com/repos/Dania02525/ecto/events","assignees_url":"https://api.github.com/repos/Dania02525/ecto/assignees{/user}","branches_url":"https://api.github.com/repos/Dania02525/ecto/branches{/branch}","tags_url":"https://api.github.com/repos/Dania02525/ecto/tags","blobs_url":"https://api.github.com/repos/Dania02525/ecto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dania02525/ecto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dania02525/ecto/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dania02525/ecto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dania02525/ecto/statuses/{sha}","languages_url":"https://api.github.com/repos/Dania02525/ecto/languages","stargazers_url":"https://api.github.com/repos/Dania02525/ecto/stargazers","contributors_url":"https://api.github.com/repos/Dania02525/ecto/contributors","subscribers_url":"https://api.github.com/repos/Dania02525/ecto/subscribers","subscription_url":"https://api.github.com/repos/Dania02525/ecto/subscription","commits_url":"https://api.github.com/repos/Dania02525/ecto/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dania02525/ecto/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dania02525/ecto/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dania02525/ecto/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dania02525/ecto/contents/{+path}","compare_url":"https://api.github.com/repos/Dania02525/ecto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dania02525/ecto/merges","archive_url":"https://api.github.com/repos/Dania02525/ecto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dania02525/ecto/downloads","issues_url":"https://api.github.com/repos/Dania02525/ecto/issues{/number}","pulls_url":"https://api.github.com/repos/Dania02525/ecto/pulls{/number}","milestones_url":"https://api.github.com/repos/Dania02525/ecto/milestones{/number}","notifications_url":"https://api.github.com/repos/Dania02525/ecto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dania02525/ecto/labels{/name}","releases_url":"https://api.github.com/repos/Dania02525/ecto/releases{/id}","created_at":"2015-10-05T23:35:47Z","updated_at":"2015-10-05T23:35:49Z","pushed_at":"2015-10-23T18:26:36Z","git_url":"git://github.com/Dania02525/ecto.git","ssh_url":"git@github.com:Dania02525/ecto.git","clone_url":"https://github.com/Dania02525/ecto.git","svn_url":"https://github.com/Dania02525/ecto","homepage":"","size":5398,"stargazers_count":0,"watchers_count":0,"language":"Elixir","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":"elixir-lang:master","ref":"master","sha":"9da771a315ef2188f76bb2d0807f23b926b75941","user":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":10649374,"name":"ecto","full_name":"elixir-lang/ecto","owner":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/ecto","description":"A database wrapper and language integrated query for Elixir","fork":false,"url":"https://api.github.com/repos/elixir-lang/ecto","forks_url":"https://api.github.com/repos/elixir-lang/ecto/forks","keys_url":"https://api.github.com/repos/elixir-lang/ecto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/ecto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/ecto/teams","hooks_url":"https://api.github.com/repos/elixir-lang/ecto/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/ecto/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/ecto/events","assignees_url":"https://api.github.com/repos/elixir-lang/ecto/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/ecto/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/ecto/tags","blobs_url":"https://api.github.com/repos/elixir-lang/ecto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/ecto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/ecto/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/ecto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/ecto/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/ecto/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/ecto/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/ecto/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/ecto/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/ecto/subscription","commits_url":"https://api.github.com/repos/elixir-lang/ecto/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/ecto/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/ecto/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/ecto/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/ecto/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/ecto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/ecto/merges","archive_url":"https://api.github.com/repos/elixir-lang/ecto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/ecto/downloads","issues_url":"https://api.github.com/repos/elixir-lang/ecto/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/ecto/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/ecto/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/ecto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/ecto/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/ecto/releases{/id}","created_at":"2013-06-12T18:42:06Z","updated_at":"2015-10-24T13:41:15Z","pushed_at":"2015-10-23T18:26:37Z","git_url":"git://github.com/elixir-lang/ecto.git","ssh_url":"git@github.com:elixir-lang/ecto.git","clone_url":"https://github.com/elixir-lang/ecto.git","svn_url":"https://github.com/elixir-lang/ecto","homepage":"","size":11822,"stargazers_count":1159,"watchers_count":1159,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":254,"mirror_url":null,"open_issues_count":33,"forks":254,"open_issues":33,"watchers":1159,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/ecto/pulls/1047"},"html":{"href":"https://github.com/elixir-lang/ecto/pull/1047"},"issue":{"href":"https://api.github.com/repos/elixir-lang/ecto/issues/1047"},"comments":{"href":"https://api.github.com/repos/elixir-lang/ecto/issues/1047/comments"},"review_comments":{"href":"https://api.github.com/repos/elixir-lang/ecto/pulls/1047/comments"},"review_comment":{"href":"https://api.github.com/repos/elixir-lang/ecto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixir-lang/ecto/pulls/1047/commits"},"statuses":{"href":"https://api.github.com/repos/elixir-lang/ecto/statuses/fc8dc708f79e9dcb33a2d19e72c5602b66089aad"}}}}