{"action":"created","comment":{"url":"https://api.github.com/repos/robmorgan/phinx/pulls/comments/71316304","id":71316304,"diff_hunk":"@@ -555,7 +609,7 @@ public function setMigrations(array $migrations)\n      * Gets an array of the database migrations.\n      *\n      * @throws \\InvalidArgumentException\n-     * @return AbstractMigration[]\n+     * @return AbstractMigration[], indexed by migration name (aka creation time) and sorted in ascending order","path":"src/Phinx/Migration/Manager.php","position":306,"original_position":306,"commit_id":"cb2c33f4680a4546ada8131e79f86b61a4de24e0","original_commit_id":"cb2c33f4680a4546ada8131e79f86b61a4de24e0","user":{"login":"daniel-gomes-sociomantic","id":2922642,"avatar_url":"https://avatars.githubusercontent.com/u/2922642?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-gomes-sociomantic","html_url":"https://github.com/daniel-gomes-sociomantic","followers_url":"https://api.github.com/users/daniel-gomes-sociomantic/followers","following_url":"https://api.github.com/users/daniel-gomes-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/daniel-gomes-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-gomes-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-gomes-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/daniel-gomes-sociomantic/orgs","repos_url":"https://api.github.com/users/daniel-gomes-sociomantic/repos","events_url":"https://api.github.com/users/daniel-gomes-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-gomes-sociomantic/received_events","type":"User","site_admin":false},"body":"so where should the `Indexed by migration name (aka creation time) and sorted in ascending order` part go to? I thought that for clarity it's important that the structure of that's method's returned array is defined somewhere","created_at":"2016-07-19T10:54:48Z","updated_at":"2016-07-19T10:54:48Z","html_url":"https://github.com/robmorgan/phinx/pull/901#discussion_r71316304","pull_request_url":"https://api.github.com/repos/robmorgan/phinx/pulls/901","_links":{"self":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/comments/71316304"},"html":{"href":"https://github.com/robmorgan/phinx/pull/901#discussion_r71316304"},"pull_request":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/901"}}},"pull_request":{"url":"https://api.github.com/repos/robmorgan/phinx/pulls/901","id":77319393,"html_url":"https://github.com/robmorgan/phinx/pull/901","diff_url":"https://github.com/robmorgan/phinx/pull/901.diff","patch_url":"https://github.com/robmorgan/phinx/pull/901.patch","issue_url":"https://api.github.com/repos/robmorgan/phinx/issues/901","number":901,"state":"open","locked":false,"title":"Rollbacks by start time","user":{"login":"daniel-gomes-sociomantic","id":2922642,"avatar_url":"https://avatars.githubusercontent.com/u/2922642?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-gomes-sociomantic","html_url":"https://github.com/daniel-gomes-sociomantic","followers_url":"https://api.github.com/users/daniel-gomes-sociomantic/followers","following_url":"https://api.github.com/users/daniel-gomes-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/daniel-gomes-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-gomes-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-gomes-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/daniel-gomes-sociomantic/orgs","repos_url":"https://api.github.com/users/daniel-gomes-sociomantic/repos","events_url":"https://api.github.com/users/daniel-gomes-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-gomes-sociomantic/received_events","type":"User","site_admin":false},"body":"A new Configuration option named `version_order` was added. Its possible values are:\r\n\r\n* `creation-time` (the default): causes the Rollback and Status commands to order the executed migrations by their creation times (aka Migration IDs or Names).\r\n* `start-time`: causes the Rollback and Status commands to order the executed migrations by their start times (aka Execution Times).\r\n\r\nThis means that when invoking the Rollback command:\r\n    \r\n- With a `start-time` version order, the last executed migration will be rollbacked.\r\n- With a `start-time` version order and a `-d (date)` option, the migration start times will be used to determine the target version to rollback to. In other words, all migrations which were executed after that date will be rollbacked.\r\n- With a `start-time` version order and a `-t (target version)` option, all migrations which were executed after the target version was executed will be rollbacked.\r\n\r\nIn terms of testing:\r\n\r\n- The old `testRollbacksByDate` test was renamed to `testRollbackToDateTime` and turned into a unit test, ensuring the `rollback` method is called with the right target version. A new `testRollback` was added which ensures the correct output of the rollback operation (as was being done in the old `testRollbacksByDate` test).\r\n- More test cases were added.\r\n- General test improvements were done (like adding the expected arguments to the underlying Manager calls in `RollbackTest` and `StatusTest`.\r\n\r\nOther notes:\r\n- Instead of altering the the original `rollback` and `rollbackToDateTime` methods to implement the new option, I chose to leave them intact and code the rollbacking by start time in two new methods (one for rollbacking to target date and one to target version). Even though this might mean some duplication of logic, I did this because it makes the resulting code much simpler and also easier to change in the future, should it be wanted that the current \"rollback by creation date\" behaviour (the default) be removed.\r\n- This PR replaces https://github.com/robmorgan/phinx/pull/745.","created_at":"2016-07-13T16:24:02Z","updated_at":"2016-07-19T10:54:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"290057812f168a04c9de8c83cf6c1766dd65769c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/robmorgan/phinx/pulls/901/commits","review_comments_url":"https://api.github.com/repos/robmorgan/phinx/pulls/901/comments","review_comment_url":"https://api.github.com/repos/robmorgan/phinx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/robmorgan/phinx/issues/901/comments","statuses_url":"https://api.github.com/repos/robmorgan/phinx/statuses/cb2c33f4680a4546ada8131e79f86b61a4de24e0","head":{"label":"daniel-gomes-sociomantic:RollbacksByStartTime","ref":"RollbacksByStartTime","sha":"cb2c33f4680a4546ada8131e79f86b61a4de24e0","user":{"login":"daniel-gomes-sociomantic","id":2922642,"avatar_url":"https://avatars.githubusercontent.com/u/2922642?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-gomes-sociomantic","html_url":"https://github.com/daniel-gomes-sociomantic","followers_url":"https://api.github.com/users/daniel-gomes-sociomantic/followers","following_url":"https://api.github.com/users/daniel-gomes-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/daniel-gomes-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-gomes-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-gomes-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/daniel-gomes-sociomantic/orgs","repos_url":"https://api.github.com/users/daniel-gomes-sociomantic/repos","events_url":"https://api.github.com/users/daniel-gomes-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-gomes-sociomantic/received_events","type":"User","site_admin":false},"repo":{"id":46130550,"name":"phinx","full_name":"daniel-gomes-sociomantic/phinx","owner":{"login":"daniel-gomes-sociomantic","id":2922642,"avatar_url":"https://avatars.githubusercontent.com/u/2922642?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-gomes-sociomantic","html_url":"https://github.com/daniel-gomes-sociomantic","followers_url":"https://api.github.com/users/daniel-gomes-sociomantic/followers","following_url":"https://api.github.com/users/daniel-gomes-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/daniel-gomes-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-gomes-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-gomes-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/daniel-gomes-sociomantic/orgs","repos_url":"https://api.github.com/users/daniel-gomes-sociomantic/repos","events_url":"https://api.github.com/users/daniel-gomes-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-gomes-sociomantic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daniel-gomes-sociomantic/phinx","description":"PHP Database Migrations for Everyone","fork":true,"url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx","forks_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/forks","keys_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/teams","hooks_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/hooks","issue_events_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/issues/events{/number}","events_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/events","assignees_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/assignees{/user}","branches_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/branches{/branch}","tags_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/tags","blobs_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/git/refs{/sha}","trees_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/statuses/{sha}","languages_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/languages","stargazers_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/stargazers","contributors_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/contributors","subscribers_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/subscribers","subscription_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/subscription","commits_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/commits{/sha}","git_commits_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/git/commits{/sha}","comments_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/comments{/number}","issue_comment_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/issues/comments{/number}","contents_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/contents/{+path}","compare_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/merges","archive_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/downloads","issues_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/issues{/number}","pulls_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/pulls{/number}","milestones_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/milestones{/number}","notifications_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/labels{/name}","releases_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/releases{/id}","deployments_url":"https://api.github.com/repos/daniel-gomes-sociomantic/phinx/deployments","created_at":"2015-11-13T15:38:00Z","updated_at":"2016-02-17T17:54:25Z","pushed_at":"2016-07-19T08:55:36Z","git_url":"git://github.com/daniel-gomes-sociomantic/phinx.git","ssh_url":"git@github.com:daniel-gomes-sociomantic/phinx.git","clone_url":"https://github.com/daniel-gomes-sociomantic/phinx.git","svn_url":"https://github.com/daniel-gomes-sociomantic/phinx","homepage":"https://phinx.org","size":3778,"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":"0.5.x-dev"}},"base":{"label":"robmorgan:0.6.x-dev","ref":"0.6.x-dev","sha":"c11abf32d32a1609bbd403a5e0e1b2ec02587f9d","user":{"login":"robmorgan","id":178939,"avatar_url":"https://avatars.githubusercontent.com/u/178939?v=3","gravatar_id":"","url":"https://api.github.com/users/robmorgan","html_url":"https://github.com/robmorgan","followers_url":"https://api.github.com/users/robmorgan/followers","following_url":"https://api.github.com/users/robmorgan/following{/other_user}","gists_url":"https://api.github.com/users/robmorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/robmorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robmorgan/subscriptions","organizations_url":"https://api.github.com/users/robmorgan/orgs","repos_url":"https://api.github.com/users/robmorgan/repos","events_url":"https://api.github.com/users/robmorgan/events{/privacy}","received_events_url":"https://api.github.com/users/robmorgan/received_events","type":"User","site_admin":false},"repo":{"id":3055234,"name":"phinx","full_name":"robmorgan/phinx","owner":{"login":"robmorgan","id":178939,"avatar_url":"https://avatars.githubusercontent.com/u/178939?v=3","gravatar_id":"","url":"https://api.github.com/users/robmorgan","html_url":"https://github.com/robmorgan","followers_url":"https://api.github.com/users/robmorgan/followers","following_url":"https://api.github.com/users/robmorgan/following{/other_user}","gists_url":"https://api.github.com/users/robmorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/robmorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robmorgan/subscriptions","organizations_url":"https://api.github.com/users/robmorgan/orgs","repos_url":"https://api.github.com/users/robmorgan/repos","events_url":"https://api.github.com/users/robmorgan/events{/privacy}","received_events_url":"https://api.github.com/users/robmorgan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robmorgan/phinx","description":"PHP Database Migrations for Everyone","fork":false,"url":"https://api.github.com/repos/robmorgan/phinx","forks_url":"https://api.github.com/repos/robmorgan/phinx/forks","keys_url":"https://api.github.com/repos/robmorgan/phinx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robmorgan/phinx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robmorgan/phinx/teams","hooks_url":"https://api.github.com/repos/robmorgan/phinx/hooks","issue_events_url":"https://api.github.com/repos/robmorgan/phinx/issues/events{/number}","events_url":"https://api.github.com/repos/robmorgan/phinx/events","assignees_url":"https://api.github.com/repos/robmorgan/phinx/assignees{/user}","branches_url":"https://api.github.com/repos/robmorgan/phinx/branches{/branch}","tags_url":"https://api.github.com/repos/robmorgan/phinx/tags","blobs_url":"https://api.github.com/repos/robmorgan/phinx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robmorgan/phinx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robmorgan/phinx/git/refs{/sha}","trees_url":"https://api.github.com/repos/robmorgan/phinx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robmorgan/phinx/statuses/{sha}","languages_url":"https://api.github.com/repos/robmorgan/phinx/languages","stargazers_url":"https://api.github.com/repos/robmorgan/phinx/stargazers","contributors_url":"https://api.github.com/repos/robmorgan/phinx/contributors","subscribers_url":"https://api.github.com/repos/robmorgan/phinx/subscribers","subscription_url":"https://api.github.com/repos/robmorgan/phinx/subscription","commits_url":"https://api.github.com/repos/robmorgan/phinx/commits{/sha}","git_commits_url":"https://api.github.com/repos/robmorgan/phinx/git/commits{/sha}","comments_url":"https://api.github.com/repos/robmorgan/phinx/comments{/number}","issue_comment_url":"https://api.github.com/repos/robmorgan/phinx/issues/comments{/number}","contents_url":"https://api.github.com/repos/robmorgan/phinx/contents/{+path}","compare_url":"https://api.github.com/repos/robmorgan/phinx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robmorgan/phinx/merges","archive_url":"https://api.github.com/repos/robmorgan/phinx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robmorgan/phinx/downloads","issues_url":"https://api.github.com/repos/robmorgan/phinx/issues{/number}","pulls_url":"https://api.github.com/repos/robmorgan/phinx/pulls{/number}","milestones_url":"https://api.github.com/repos/robmorgan/phinx/milestones{/number}","notifications_url":"https://api.github.com/repos/robmorgan/phinx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robmorgan/phinx/labels{/name}","releases_url":"https://api.github.com/repos/robmorgan/phinx/releases{/id}","deployments_url":"https://api.github.com/repos/robmorgan/phinx/deployments","created_at":"2011-12-27T06:49:45Z","updated_at":"2016-07-18T14:54:15Z","pushed_at":"2016-07-19T09:52:51Z","git_url":"git://github.com/robmorgan/phinx.git","ssh_url":"git@github.com:robmorgan/phinx.git","clone_url":"https://github.com/robmorgan/phinx.git","svn_url":"https://github.com/robmorgan/phinx","homepage":"https://phinx.org","size":6158,"stargazers_count":2381,"watchers_count":2381,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":518,"mirror_url":null,"open_issues_count":246,"forks":518,"open_issues":246,"watchers":2381,"default_branch":"0.6.x-dev"}},"_links":{"self":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/901"},"html":{"href":"https://github.com/robmorgan/phinx/pull/901"},"issue":{"href":"https://api.github.com/repos/robmorgan/phinx/issues/901"},"comments":{"href":"https://api.github.com/repos/robmorgan/phinx/issues/901/comments"},"review_comments":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/901/comments"},"review_comment":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/901/commits"},"statuses":{"href":"https://api.github.com/repos/robmorgan/phinx/statuses/cb2c33f4680a4546ada8131e79f86b61a4de24e0"}}}}
{"actor":{"display_login":"daniel-gomes-sociomantic"}}