{"action":"created","comment":{"url":"https://api.github.com/repos/piwik/piwik/pulls/comments/85668369","pull_request_review_id":6370925,"id":85668369,"diff_hunk":"@@ -12,21 +12,40 @@\n use Piwik\\Common;\n use Piwik\\Updater;\n use Piwik\\Updates;\n+use Piwik\\Updater\\Migration\\Factory as MigrationFactory;\n \n \n class Updates_3_0_0_b1 extends Updates\n {\n-    public function getMigrationQueries(Updater $updater)\n+    /**\n+     * @var MigrationFactory\n+     */\n+    private $migration;\n+\n+    public function __construct(MigrationFactory $factory)\n     {\n-        $updateSql = array(\n-            'ALTER TABLE `' . Common::prefixTable('goal')\n-                . '` ADD COLUMN `description` VARCHAR(255) NOT NULL DEFAULT \\'\\' AFTER `name`;' => array(1060)\n+        $this->migration = $factory;\n+    }\n+\n+    /**\n+     * Here you can define one or multiple SQL statements that should be executed during the update.\n+     * @return Updater\\Migration[]\n+     */\n+    public function getMigrations(Updater $updater)\n+    {\n+        $updateSql = 'ALTER TABLE `' . Common::prefixTable('goal'). '` ADD COLUMN `description` VARCHAR(255) NOT NULL DEFAULT \\'\\' AFTER `name`;';\n+\n+        return array(\n+            $this->migration->db->sql($updateSql, Updater\\Migration\\Db::ERROR_CODE_DUPLICATE_COLUMN)","path":"plugins/Goals/Updates/3.0.0-b1.php","position":null,"original_position":32,"commit_id":"8009c53332a1fd0946fac54898e35fbc4fe4e5ad","original_commit_id":"ae9c984d27fa453dd34071b98db80e0fdde14816","user":{"login":"sgiehl","id":1579355,"avatar_url":"https://avatars.githubusercontent.com/u/1579355?v=3","gravatar_id":"","url":"https://api.github.com/users/sgiehl","html_url":"https://github.com/sgiehl","followers_url":"https://api.github.com/users/sgiehl/followers","following_url":"https://api.github.com/users/sgiehl/following{/other_user}","gists_url":"https://api.github.com/users/sgiehl/gists{/gist_id}","starred_url":"https://api.github.com/users/sgiehl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgiehl/subscriptions","organizations_url":"https://api.github.com/users/sgiehl/orgs","repos_url":"https://api.github.com/users/sgiehl/repos","events_url":"https://api.github.com/users/sgiehl/events{/privacy}","received_events_url":"https://api.github.com/users/sgiehl/received_events","type":"User","site_admin":false},"body":"Sure. Changed it.","created_at":"2016-10-30T20:23:11Z","updated_at":"2016-10-30T20:23:11Z","html_url":"https://github.com/piwik/piwik/pull/10808#discussion_r85668369","pull_request_url":"https://api.github.com/repos/piwik/piwik/pulls/10808","_links":{"self":{"href":"https://api.github.com/repos/piwik/piwik/pulls/comments/85668369"},"html":{"href":"https://github.com/piwik/piwik/pull/10808#discussion_r85668369"},"pull_request":{"href":"https://api.github.com/repos/piwik/piwik/pulls/10808"}}},"pull_request":{"url":"https://api.github.com/repos/piwik/piwik/pulls/10808","id":91534248,"html_url":"https://github.com/piwik/piwik/pull/10808","diff_url":"https://github.com/piwik/piwik/pull/10808.diff","patch_url":"https://github.com/piwik/piwik/pull/10808.patch","issue_url":"https://api.github.com/repos/piwik/piwik/issues/10808","number":10808,"state":"open","locked":false,"title":"Migrate Goal plugin update script to use Migration Factory","user":{"login":"sgiehl","id":1579355,"avatar_url":"https://avatars.githubusercontent.com/u/1579355?v=3","gravatar_id":"","url":"https://api.github.com/users/sgiehl","html_url":"https://github.com/sgiehl","followers_url":"https://api.github.com/users/sgiehl/followers","following_url":"https://api.github.com/users/sgiehl/following{/other_user}","gists_url":"https://api.github.com/users/sgiehl/gists{/gist_id}","starred_url":"https://api.github.com/users/sgiehl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgiehl/subscriptions","organizations_url":"https://api.github.com/users/sgiehl/orgs","repos_url":"https://api.github.com/users/sgiehl/repos","events_url":"https://api.github.com/users/sgiehl/events{/privacy}","received_events_url":"https://api.github.com/users/sgiehl/received_events","type":"User","site_admin":false},"body":"As mentioned in comment here: https://github.com/piwik/piwik/commit/ab3eba1b854e978ed4f3bcb3b144a4fff2964aab#commitcomment-19183659\r\n \r\nGoal plugin update script now uses Migration Factory\r\n\r\n","created_at":"2016-10-30T20:06:20Z","updated_at":"2016-10-30T20:23:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca536f6dd6004fb628476ad22f0c304255b09d85","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/piwik/piwik/milestones/88","html_url":"https://github.com/piwik/piwik/milestones/3.0.0-b2","labels_url":"https://api.github.com/repos/piwik/piwik/milestones/88/labels","id":1253365,"number":88,"title":"3.0.0-b2","description":"","creator":{"login":"mattab","id":466765,"avatar_url":"https://avatars.githubusercontent.com/u/466765?v=3","gravatar_id":"","url":"https://api.github.com/users/mattab","html_url":"https://github.com/mattab","followers_url":"https://api.github.com/users/mattab/followers","following_url":"https://api.github.com/users/mattab/following{/other_user}","gists_url":"https://api.github.com/users/mattab/gists{/gist_id}","starred_url":"https://api.github.com/users/mattab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattab/subscriptions","organizations_url":"https://api.github.com/users/mattab/orgs","repos_url":"https://api.github.com/users/mattab/repos","events_url":"https://api.github.com/users/mattab/events{/privacy}","received_events_url":"https://api.github.com/users/mattab/received_events","type":"User","site_admin":false},"open_issues":43,"closed_issues":24,"state":"open","created_at":"2015-08-13T10:26:52Z","updated_at":"2016-10-30T20:18:15Z","due_on":"2016-10-15T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/piwik/piwik/pulls/10808/commits","review_comments_url":"https://api.github.com/repos/piwik/piwik/pulls/10808/comments","review_comment_url":"https://api.github.com/repos/piwik/piwik/pulls/comments{/number}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/10808/comments","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/8009c53332a1fd0946fac54898e35fbc4fe4e5ad","head":{"label":"piwik:migrategoalupdatescript","ref":"migrategoalupdatescript","sha":"8009c53332a1fd0946fac54898e35fbc4fe4e5ad","user":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"piwik","full_name":"piwik/piwik","owner":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/piwik/piwik","description":"Liberating Web Analytics. Star us on Github? +1. Piwik is the leading open alternative to Google Analytics that gives you full control over your data. Piwik lets you easily collect data from websites, apps & the IoT and visualise this data and extract insights. Privacy is built-in. We love Pull Requests! ","fork":false,"url":"https://api.github.com/repos/piwik/piwik","forks_url":"https://api.github.com/repos/piwik/piwik/forks","keys_url":"https://api.github.com/repos/piwik/piwik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piwik/piwik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piwik/piwik/teams","hooks_url":"https://api.github.com/repos/piwik/piwik/hooks","issue_events_url":"https://api.github.com/repos/piwik/piwik/issues/events{/number}","events_url":"https://api.github.com/repos/piwik/piwik/events","assignees_url":"https://api.github.com/repos/piwik/piwik/assignees{/user}","branches_url":"https://api.github.com/repos/piwik/piwik/branches{/branch}","tags_url":"https://api.github.com/repos/piwik/piwik/tags","blobs_url":"https://api.github.com/repos/piwik/piwik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piwik/piwik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piwik/piwik/git/refs{/sha}","trees_url":"https://api.github.com/repos/piwik/piwik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/{sha}","languages_url":"https://api.github.com/repos/piwik/piwik/languages","stargazers_url":"https://api.github.com/repos/piwik/piwik/stargazers","contributors_url":"https://api.github.com/repos/piwik/piwik/contributors","subscribers_url":"https://api.github.com/repos/piwik/piwik/subscribers","subscription_url":"https://api.github.com/repos/piwik/piwik/subscription","commits_url":"https://api.github.com/repos/piwik/piwik/commits{/sha}","git_commits_url":"https://api.github.com/repos/piwik/piwik/git/commits{/sha}","comments_url":"https://api.github.com/repos/piwik/piwik/comments{/number}","issue_comment_url":"https://api.github.com/repos/piwik/piwik/issues/comments{/number}","contents_url":"https://api.github.com/repos/piwik/piwik/contents/{+path}","compare_url":"https://api.github.com/repos/piwik/piwik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piwik/piwik/merges","archive_url":"https://api.github.com/repos/piwik/piwik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piwik/piwik/downloads","issues_url":"https://api.github.com/repos/piwik/piwik/issues{/number}","pulls_url":"https://api.github.com/repos/piwik/piwik/pulls{/number}","milestones_url":"https://api.github.com/repos/piwik/piwik/milestones{/number}","notifications_url":"https://api.github.com/repos/piwik/piwik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piwik/piwik/labels{/name}","releases_url":"https://api.github.com/repos/piwik/piwik/releases{/id}","deployments_url":"https://api.github.com/repos/piwik/piwik/deployments","created_at":"2011-03-30T21:18:17Z","updated_at":"2016-10-30T17:13:33Z","pushed_at":"2016-10-30T20:22:43Z","git_url":"git://github.com/piwik/piwik.git","ssh_url":"git@github.com:piwik/piwik.git","clone_url":"https://github.com/piwik/piwik.git","svn_url":"https://github.com/piwik/piwik","homepage":"http://piwik.org/","size":211973,"stargazers_count":6235,"watchers_count":6235,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1094,"mirror_url":null,"open_issues_count":1416,"forks":1094,"open_issues":1416,"watchers":6235,"default_branch":"3.x-dev"}},"base":{"label":"piwik:3.x-dev","ref":"3.x-dev","sha":"570bc14616884b40025277e63cabc424be480d29","user":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"piwik","full_name":"piwik/piwik","owner":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/piwik/piwik","description":"Liberating Web Analytics. Star us on Github? +1. Piwik is the leading open alternative to Google Analytics that gives you full control over your data. Piwik lets you easily collect data from websites, apps & the IoT and visualise this data and extract insights. Privacy is built-in. We love Pull Requests! ","fork":false,"url":"https://api.github.com/repos/piwik/piwik","forks_url":"https://api.github.com/repos/piwik/piwik/forks","keys_url":"https://api.github.com/repos/piwik/piwik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piwik/piwik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piwik/piwik/teams","hooks_url":"https://api.github.com/repos/piwik/piwik/hooks","issue_events_url":"https://api.github.com/repos/piwik/piwik/issues/events{/number}","events_url":"https://api.github.com/repos/piwik/piwik/events","assignees_url":"https://api.github.com/repos/piwik/piwik/assignees{/user}","branches_url":"https://api.github.com/repos/piwik/piwik/branches{/branch}","tags_url":"https://api.github.com/repos/piwik/piwik/tags","blobs_url":"https://api.github.com/repos/piwik/piwik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piwik/piwik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piwik/piwik/git/refs{/sha}","trees_url":"https://api.github.com/repos/piwik/piwik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/{sha}","languages_url":"https://api.github.com/repos/piwik/piwik/languages","stargazers_url":"https://api.github.com/repos/piwik/piwik/stargazers","contributors_url":"https://api.github.com/repos/piwik/piwik/contributors","subscribers_url":"https://api.github.com/repos/piwik/piwik/subscribers","subscription_url":"https://api.github.com/repos/piwik/piwik/subscription","commits_url":"https://api.github.com/repos/piwik/piwik/commits{/sha}","git_commits_url":"https://api.github.com/repos/piwik/piwik/git/commits{/sha}","comments_url":"https://api.github.com/repos/piwik/piwik/comments{/number}","issue_comment_url":"https://api.github.com/repos/piwik/piwik/issues/comments{/number}","contents_url":"https://api.github.com/repos/piwik/piwik/contents/{+path}","compare_url":"https://api.github.com/repos/piwik/piwik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piwik/piwik/merges","archive_url":"https://api.github.com/repos/piwik/piwik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piwik/piwik/downloads","issues_url":"https://api.github.com/repos/piwik/piwik/issues{/number}","pulls_url":"https://api.github.com/repos/piwik/piwik/pulls{/number}","milestones_url":"https://api.github.com/repos/piwik/piwik/milestones{/number}","notifications_url":"https://api.github.com/repos/piwik/piwik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piwik/piwik/labels{/name}","releases_url":"https://api.github.com/repos/piwik/piwik/releases{/id}","deployments_url":"https://api.github.com/repos/piwik/piwik/deployments","created_at":"2011-03-30T21:18:17Z","updated_at":"2016-10-30T17:13:33Z","pushed_at":"2016-10-30T20:22:43Z","git_url":"git://github.com/piwik/piwik.git","ssh_url":"git@github.com:piwik/piwik.git","clone_url":"https://github.com/piwik/piwik.git","svn_url":"https://github.com/piwik/piwik","homepage":"http://piwik.org/","size":211973,"stargazers_count":6235,"watchers_count":6235,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1094,"mirror_url":null,"open_issues_count":1416,"forks":1094,"open_issues":1416,"watchers":6235,"default_branch":"3.x-dev"}},"_links":{"self":{"href":"https://api.github.com/repos/piwik/piwik/pulls/10808"},"html":{"href":"https://github.com/piwik/piwik/pull/10808"},"issue":{"href":"https://api.github.com/repos/piwik/piwik/issues/10808"},"comments":{"href":"https://api.github.com/repos/piwik/piwik/issues/10808/comments"},"review_comments":{"href":"https://api.github.com/repos/piwik/piwik/pulls/10808/comments"},"review_comment":{"href":"https://api.github.com/repos/piwik/piwik/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/piwik/piwik/pulls/10808/commits"},"statuses":{"href":"https://api.github.com/repos/piwik/piwik/statuses/8009c53332a1fd0946fac54898e35fbc4fe4e5ad"}}}}
{"actor":{"display_login":"sgiehl"}}