{"action":"opened","number":362,"pull_request":{"url":"https://api.github.com/repos/doctrine/migrations/pulls/362","id":47866816,"html_url":"https://github.com/doctrine/migrations/pull/362","diff_url":"https://github.com/doctrine/migrations/pull/362.diff","patch_url":"https://github.com/doctrine/migrations/pull/362.patch","issue_url":"https://api.github.com/repos/doctrine/migrations/issues/362","number":362,"state":"open","locked":false,"title":"support addSql() calls in postUp/postDown methods","user":{"login":"farzadghanei","id":644113,"avatar_url":"https://avatars.githubusercontent.com/u/644113?v=3","gravatar_id":"","url":"https://api.github.com/users/farzadghanei","html_url":"https://github.com/farzadghanei","followers_url":"https://api.github.com/users/farzadghanei/followers","following_url":"https://api.github.com/users/farzadghanei/following{/other_user}","gists_url":"https://api.github.com/users/farzadghanei/gists{/gist_id}","starred_url":"https://api.github.com/users/farzadghanei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farzadghanei/subscriptions","organizations_url":"https://api.github.com/users/farzadghanei/orgs","repos_url":"https://api.github.com/users/farzadghanei/repos","events_url":"https://api.github.com/users/farzadghanei/events{/privacy}","received_events_url":"https://api.github.com/users/farzadghanei/received_events","type":"User","site_admin":false},"body":"In migration version classes It's possible to call `$this->addSql()` method (will be proxied to `Doctrine\\DBAL\\Migrations\\Version::addSql` in preUp/preDown and `up`/`down` methods. But calling this method in `postUp`/`postDown` will have no effect right now since all the SQL commands queued to be executed are executed before the `postUp`/`postDown` methods.\r\n\r\nThis branch allows calling `addSql` in `postUp`/`postDown` by extracting the logic of executing the SQL queue from the `execute` method body into a private method, and call it both `up`/`down` as well as `postUp`/`postDown`.","created_at":"2015-10-16T03:11:23Z","updated_at":"2015-10-16T03:11:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/doctrine/migrations/pulls/362/commits","review_comments_url":"https://api.github.com/repos/doctrine/migrations/pulls/362/comments","review_comment_url":"https://api.github.com/repos/doctrine/migrations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doctrine/migrations/issues/362/comments","statuses_url":"https://api.github.com/repos/doctrine/migrations/statuses/ac698ec409996b0fd4ed5870f6707c86e3e1ec4c","head":{"label":"farzadghanei:add-sql-in-pre-post-hooks","ref":"add-sql-in-pre-post-hooks","sha":"ac698ec409996b0fd4ed5870f6707c86e3e1ec4c","user":{"login":"farzadghanei","id":644113,"avatar_url":"https://avatars.githubusercontent.com/u/644113?v=3","gravatar_id":"","url":"https://api.github.com/users/farzadghanei","html_url":"https://github.com/farzadghanei","followers_url":"https://api.github.com/users/farzadghanei/followers","following_url":"https://api.github.com/users/farzadghanei/following{/other_user}","gists_url":"https://api.github.com/users/farzadghanei/gists{/gist_id}","starred_url":"https://api.github.com/users/farzadghanei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farzadghanei/subscriptions","organizations_url":"https://api.github.com/users/farzadghanei/orgs","repos_url":"https://api.github.com/users/farzadghanei/repos","events_url":"https://api.github.com/users/farzadghanei/events{/privacy}","received_events_url":"https://api.github.com/users/farzadghanei/received_events","type":"User","site_admin":false},"repo":{"id":44355564,"name":"migrations","full_name":"farzadghanei/migrations","owner":{"login":"farzadghanei","id":644113,"avatar_url":"https://avatars.githubusercontent.com/u/644113?v=3","gravatar_id":"","url":"https://api.github.com/users/farzadghanei","html_url":"https://github.com/farzadghanei","followers_url":"https://api.github.com/users/farzadghanei/followers","following_url":"https://api.github.com/users/farzadghanei/following{/other_user}","gists_url":"https://api.github.com/users/farzadghanei/gists{/gist_id}","starred_url":"https://api.github.com/users/farzadghanei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farzadghanei/subscriptions","organizations_url":"https://api.github.com/users/farzadghanei/orgs","repos_url":"https://api.github.com/users/farzadghanei/repos","events_url":"https://api.github.com/users/farzadghanei/events{/privacy}","received_events_url":"https://api.github.com/users/farzadghanei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/farzadghanei/migrations","description":"Doctrine Database Migrations Library","fork":true,"url":"https://api.github.com/repos/farzadghanei/migrations","forks_url":"https://api.github.com/repos/farzadghanei/migrations/forks","keys_url":"https://api.github.com/repos/farzadghanei/migrations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/farzadghanei/migrations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/farzadghanei/migrations/teams","hooks_url":"https://api.github.com/repos/farzadghanei/migrations/hooks","issue_events_url":"https://api.github.com/repos/farzadghanei/migrations/issues/events{/number}","events_url":"https://api.github.com/repos/farzadghanei/migrations/events","assignees_url":"https://api.github.com/repos/farzadghanei/migrations/assignees{/user}","branches_url":"https://api.github.com/repos/farzadghanei/migrations/branches{/branch}","tags_url":"https://api.github.com/repos/farzadghanei/migrations/tags","blobs_url":"https://api.github.com/repos/farzadghanei/migrations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/farzadghanei/migrations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/farzadghanei/migrations/git/refs{/sha}","trees_url":"https://api.github.com/repos/farzadghanei/migrations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/farzadghanei/migrations/statuses/{sha}","languages_url":"https://api.github.com/repos/farzadghanei/migrations/languages","stargazers_url":"https://api.github.com/repos/farzadghanei/migrations/stargazers","contributors_url":"https://api.github.com/repos/farzadghanei/migrations/contributors","subscribers_url":"https://api.github.com/repos/farzadghanei/migrations/subscribers","subscription_url":"https://api.github.com/repos/farzadghanei/migrations/subscription","commits_url":"https://api.github.com/repos/farzadghanei/migrations/commits{/sha}","git_commits_url":"https://api.github.com/repos/farzadghanei/migrations/git/commits{/sha}","comments_url":"https://api.github.com/repos/farzadghanei/migrations/comments{/number}","issue_comment_url":"https://api.github.com/repos/farzadghanei/migrations/issues/comments{/number}","contents_url":"https://api.github.com/repos/farzadghanei/migrations/contents/{+path}","compare_url":"https://api.github.com/repos/farzadghanei/migrations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/farzadghanei/migrations/merges","archive_url":"https://api.github.com/repos/farzadghanei/migrations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/farzadghanei/migrations/downloads","issues_url":"https://api.github.com/repos/farzadghanei/migrations/issues{/number}","pulls_url":"https://api.github.com/repos/farzadghanei/migrations/pulls{/number}","milestones_url":"https://api.github.com/repos/farzadghanei/migrations/milestones{/number}","notifications_url":"https://api.github.com/repos/farzadghanei/migrations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/farzadghanei/migrations/labels{/name}","releases_url":"https://api.github.com/repos/farzadghanei/migrations/releases{/id}","created_at":"2015-10-16T01:41:12Z","updated_at":"2015-10-16T01:41:13Z","pushed_at":"2015-10-16T03:04:20Z","git_url":"git://github.com/farzadghanei/migrations.git","ssh_url":"git@github.com:farzadghanei/migrations.git","clone_url":"https://github.com/farzadghanei/migrations.git","svn_url":"https://github.com/farzadghanei/migrations","homepage":"http://www.doctrine-project.org/projects/migrations.html","size":2441,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"doctrine:master","ref":"master","sha":"f4f5bdf6cc84011513ca6b582f85330a09a5037b","user":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"repo":{"id":576099,"name":"migrations","full_name":"doctrine/migrations","owner":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/doctrine/migrations","description":"Doctrine Database Migrations Library","fork":false,"url":"https://api.github.com/repos/doctrine/migrations","forks_url":"https://api.github.com/repos/doctrine/migrations/forks","keys_url":"https://api.github.com/repos/doctrine/migrations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doctrine/migrations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doctrine/migrations/teams","hooks_url":"https://api.github.com/repos/doctrine/migrations/hooks","issue_events_url":"https://api.github.com/repos/doctrine/migrations/issues/events{/number}","events_url":"https://api.github.com/repos/doctrine/migrations/events","assignees_url":"https://api.github.com/repos/doctrine/migrations/assignees{/user}","branches_url":"https://api.github.com/repos/doctrine/migrations/branches{/branch}","tags_url":"https://api.github.com/repos/doctrine/migrations/tags","blobs_url":"https://api.github.com/repos/doctrine/migrations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doctrine/migrations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doctrine/migrations/git/refs{/sha}","trees_url":"https://api.github.com/repos/doctrine/migrations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doctrine/migrations/statuses/{sha}","languages_url":"https://api.github.com/repos/doctrine/migrations/languages","stargazers_url":"https://api.github.com/repos/doctrine/migrations/stargazers","contributors_url":"https://api.github.com/repos/doctrine/migrations/contributors","subscribers_url":"https://api.github.com/repos/doctrine/migrations/subscribers","subscription_url":"https://api.github.com/repos/doctrine/migrations/subscription","commits_url":"https://api.github.com/repos/doctrine/migrations/commits{/sha}","git_commits_url":"https://api.github.com/repos/doctrine/migrations/git/commits{/sha}","comments_url":"https://api.github.com/repos/doctrine/migrations/comments{/number}","issue_comment_url":"https://api.github.com/repos/doctrine/migrations/issues/comments{/number}","contents_url":"https://api.github.com/repos/doctrine/migrations/contents/{+path}","compare_url":"https://api.github.com/repos/doctrine/migrations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doctrine/migrations/merges","archive_url":"https://api.github.com/repos/doctrine/migrations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doctrine/migrations/downloads","issues_url":"https://api.github.com/repos/doctrine/migrations/issues{/number}","pulls_url":"https://api.github.com/repos/doctrine/migrations/pulls{/number}","milestones_url":"https://api.github.com/repos/doctrine/migrations/milestones{/number}","notifications_url":"https://api.github.com/repos/doctrine/migrations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doctrine/migrations/labels{/name}","releases_url":"https://api.github.com/repos/doctrine/migrations/releases{/id}","created_at":"2010-03-23T18:08:24Z","updated_at":"2015-10-14T08:47:12Z","pushed_at":"2015-10-15T07:47:05Z","git_url":"git://github.com/doctrine/migrations.git","ssh_url":"git@github.com:doctrine/migrations.git","clone_url":"https://github.com/doctrine/migrations.git","svn_url":"https://github.com/doctrine/migrations","homepage":"http://www.doctrine-project.org/projects/migrations.html","size":2441,"stargazers_count":324,"watchers_count":324,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":192,"mirror_url":null,"open_issues_count":33,"forks":192,"open_issues":33,"watchers":324,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doctrine/migrations/pulls/362"},"html":{"href":"https://github.com/doctrine/migrations/pull/362"},"issue":{"href":"https://api.github.com/repos/doctrine/migrations/issues/362"},"comments":{"href":"https://api.github.com/repos/doctrine/migrations/issues/362/comments"},"review_comments":{"href":"https://api.github.com/repos/doctrine/migrations/pulls/362/comments"},"review_comment":{"href":"https://api.github.com/repos/doctrine/migrations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doctrine/migrations/pulls/362/commits"},"statuses":{"href":"https://api.github.com/repos/doctrine/migrations/statuses/ac698ec409996b0fd4ed5870f6707c86e3e1ec4c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":44,"deletions":29,"changed_files":1}}