{"action":"created","comment":{"url":"https://api.github.com/repos/cakephp/migrations/pulls/comments/49275343","id":49275343,"diff_hunk":"@@ -261,3 +261,47 @@ If no length is specified, lengths for certain columns are defaulted:\n - *string*: `255`\n - *integer*: `11`\n - *biginteger*: `20`\n+\n+### Seeding your database\n+\n+As of 1.5.5, you can use the ``migrations`` shell to seed your database. This leverage the [Phinx library seed feature](http://docs.phinx.org/en/latest/seeding.html).\n+By default, seed files will be looked for in the ``config/Seeds`̀  directory of your application.\n+Please make sure you follow [Phinx instructions to build your seed files](http://docs.phinx.org/en/latest/seeding.html#creating-a-new-seed-class).\n+\n+As for migrations, a ``bake`` interface is provided for seed files:\n+\n+```bash\n+# This will create a ArticlesSeed.php file in the directory config/Seeds of your application\n+# By default, the table the seed will try to alter is the \"tableized\" version of the seed filename\n+bin/cake bake seed Articles\n+\n+# You specify the name of the table the seed files will alter by using the ``--table`` option\n+bin/cake bake seed Articles --table my_articles_table","path":"README.md","position":19,"original_position":19,"commit_id":"3e003803325e46c37f2c882ebca941fb4cba2341","original_commit_id":"f8001edefaea3f7e82ff0e1dd62eac0ad1cf5aa3","user":{"login":"HavokInspiration","id":5243386,"avatar_url":"https://avatars.githubusercontent.com/u/5243386?v=3","gravatar_id":"","url":"https://api.github.com/users/HavokInspiration","html_url":"https://github.com/HavokInspiration","followers_url":"https://api.github.com/users/HavokInspiration/followers","following_url":"https://api.github.com/users/HavokInspiration/following{/other_user}","gists_url":"https://api.github.com/users/HavokInspiration/gists{/gist_id}","starred_url":"https://api.github.com/users/HavokInspiration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HavokInspiration/subscriptions","organizations_url":"https://api.github.com/users/HavokInspiration/orgs","repos_url":"https://api.github.com/users/HavokInspiration/repos","events_url":"https://api.github.com/users/HavokInspiration/events{/privacy}","received_events_url":"https://api.github.com/users/HavokInspiration/received_events","type":"User","site_admin":false},"body":"I don't really know if it makes sense actually.\r\n\r\nWould the table name be resolved in ``SeedTask::templateData()`` and given to the view ? (meaning that the table name will be hard-coded anyway)\r\n\r\nOr will we end-up having a ``TableRegistry::get($model)`` in the baked file in place of the table name in the ``table()`` method ?","created_at":"2016-01-10T12:42:57Z","updated_at":"2016-01-10T12:42:57Z","html_url":"https://github.com/cakephp/migrations/pull/181#discussion_r49275343","pull_request_url":"https://api.github.com/repos/cakephp/migrations/pulls/181","_links":{"self":{"href":"https://api.github.com/repos/cakephp/migrations/pulls/comments/49275343"},"html":{"href":"https://github.com/cakephp/migrations/pull/181#discussion_r49275343"},"pull_request":{"href":"https://api.github.com/repos/cakephp/migrations/pulls/181"}}},"pull_request":{"url":"https://api.github.com/repos/cakephp/migrations/pulls/181","id":55528346,"html_url":"https://github.com/cakephp/migrations/pull/181","diff_url":"https://github.com/cakephp/migrations/pull/181.diff","patch_url":"https://github.com/cakephp/migrations/pull/181.patch","issue_url":"https://api.github.com/repos/cakephp/migrations/issues/181","number":181,"state":"closed","locked":false,"title":"Seed command","user":{"login":"HavokInspiration","id":5243386,"avatar_url":"https://avatars.githubusercontent.com/u/5243386?v=3","gravatar_id":"","url":"https://api.github.com/users/HavokInspiration","html_url":"https://github.com/HavokInspiration","followers_url":"https://api.github.com/users/HavokInspiration/followers","following_url":"https://api.github.com/users/HavokInspiration/following{/other_user}","gists_url":"https://api.github.com/users/HavokInspiration/gists{/gist_id}","starred_url":"https://api.github.com/users/HavokInspiration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HavokInspiration/subscriptions","organizations_url":"https://api.github.com/users/HavokInspiration/orgs","repos_url":"https://api.github.com/users/HavokInspiration/repos","events_url":"https://api.github.com/users/HavokInspiration/events{/privacy}","received_events_url":"https://api.github.com/users/HavokInspiration/received_events","type":"User","site_admin":false},"body":"Follow up to #179 \r\nThis implements the command in the MigrationsShell\r\n\r\nOnce everything is okay, we should start working on documenting everything (baking seeds and running the command).","created_at":"2016-01-09T00:35:18Z","updated_at":"2016-01-10T12:42:57Z","closed_at":"2016-01-10T11:47:59Z","merged_at":"2016-01-10T11:47:59Z","merge_commit_sha":"7e981fb1d6de0db15b5852940ab690442884a86b","assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/migrations/milestones/23","html_url":"https://github.com/cakephp/migrations/milestones/1.5.5","labels_url":"https://api.github.com/repos/cakephp/migrations/milestones/23/labels","id":1494494,"number":23,"title":"1.5.5","description":"","creator":{"login":"HavokInspiration","id":5243386,"avatar_url":"https://avatars.githubusercontent.com/u/5243386?v=3","gravatar_id":"","url":"https://api.github.com/users/HavokInspiration","html_url":"https://github.com/HavokInspiration","followers_url":"https://api.github.com/users/HavokInspiration/followers","following_url":"https://api.github.com/users/HavokInspiration/following{/other_user}","gists_url":"https://api.github.com/users/HavokInspiration/gists{/gist_id}","starred_url":"https://api.github.com/users/HavokInspiration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HavokInspiration/subscriptions","organizations_url":"https://api.github.com/users/HavokInspiration/orgs","repos_url":"https://api.github.com/users/HavokInspiration/repos","events_url":"https://api.github.com/users/HavokInspiration/events{/privacy}","received_events_url":"https://api.github.com/users/HavokInspiration/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":1,"state":"open","created_at":"2016-01-09T00:36:18Z","updated_at":"2016-01-10T12:36:28Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/cakephp/migrations/pulls/181/commits","review_comments_url":"https://api.github.com/repos/cakephp/migrations/pulls/181/comments","review_comment_url":"https://api.github.com/repos/cakephp/migrations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cakephp/migrations/issues/181/comments","statuses_url":"https://api.github.com/repos/cakephp/migrations/statuses/3e003803325e46c37f2c882ebca941fb4cba2341","head":{"label":"cakephp:seed-command","ref":"seed-command","sha":"3e003803325e46c37f2c882ebca941fb4cba2341","user":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"repo":{"id":23262129,"name":"migrations","full_name":"cakephp/migrations","owner":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cakephp/migrations","description":"CakePHP 3.0 database migrations plugin","fork":false,"url":"https://api.github.com/repos/cakephp/migrations","forks_url":"https://api.github.com/repos/cakephp/migrations/forks","keys_url":"https://api.github.com/repos/cakephp/migrations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cakephp/migrations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cakephp/migrations/teams","hooks_url":"https://api.github.com/repos/cakephp/migrations/hooks","issue_events_url":"https://api.github.com/repos/cakephp/migrations/issues/events{/number}","events_url":"https://api.github.com/repos/cakephp/migrations/events","assignees_url":"https://api.github.com/repos/cakephp/migrations/assignees{/user}","branches_url":"https://api.github.com/repos/cakephp/migrations/branches{/branch}","tags_url":"https://api.github.com/repos/cakephp/migrations/tags","blobs_url":"https://api.github.com/repos/cakephp/migrations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cakephp/migrations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cakephp/migrations/git/refs{/sha}","trees_url":"https://api.github.com/repos/cakephp/migrations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cakephp/migrations/statuses/{sha}","languages_url":"https://api.github.com/repos/cakephp/migrations/languages","stargazers_url":"https://api.github.com/repos/cakephp/migrations/stargazers","contributors_url":"https://api.github.com/repos/cakephp/migrations/contributors","subscribers_url":"https://api.github.com/repos/cakephp/migrations/subscribers","subscription_url":"https://api.github.com/repos/cakephp/migrations/subscription","commits_url":"https://api.github.com/repos/cakephp/migrations/commits{/sha}","git_commits_url":"https://api.github.com/repos/cakephp/migrations/git/commits{/sha}","comments_url":"https://api.github.com/repos/cakephp/migrations/comments{/number}","issue_comment_url":"https://api.github.com/repos/cakephp/migrations/issues/comments{/number}","contents_url":"https://api.github.com/repos/cakephp/migrations/contents/{+path}","compare_url":"https://api.github.com/repos/cakephp/migrations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cakephp/migrations/merges","archive_url":"https://api.github.com/repos/cakephp/migrations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cakephp/migrations/downloads","issues_url":"https://api.github.com/repos/cakephp/migrations/issues{/number}","pulls_url":"https://api.github.com/repos/cakephp/migrations/pulls{/number}","milestones_url":"https://api.github.com/repos/cakephp/migrations/milestones{/number}","notifications_url":"https://api.github.com/repos/cakephp/migrations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cakephp/migrations/labels{/name}","releases_url":"https://api.github.com/repos/cakephp/migrations/releases{/id}","created_at":"2014-08-23T17:40:26Z","updated_at":"2015-12-28T15:20:01Z","pushed_at":"2016-01-10T12:36:29Z","git_url":"git://github.com/cakephp/migrations.git","ssh_url":"git@github.com:cakephp/migrations.git","clone_url":"https://github.com/cakephp/migrations.git","svn_url":"https://github.com/cakephp/migrations","homepage":null,"size":472,"stargazers_count":63,"watchers_count":63,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":5,"forks":39,"open_issues":5,"watchers":63,"default_branch":"master"}},"base":{"label":"cakephp:master","ref":"master","sha":"c5960e324213f733e20c0e4629134d708f5ffc38","user":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"repo":{"id":23262129,"name":"migrations","full_name":"cakephp/migrations","owner":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cakephp/migrations","description":"CakePHP 3.0 database migrations plugin","fork":false,"url":"https://api.github.com/repos/cakephp/migrations","forks_url":"https://api.github.com/repos/cakephp/migrations/forks","keys_url":"https://api.github.com/repos/cakephp/migrations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cakephp/migrations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cakephp/migrations/teams","hooks_url":"https://api.github.com/repos/cakephp/migrations/hooks","issue_events_url":"https://api.github.com/repos/cakephp/migrations/issues/events{/number}","events_url":"https://api.github.com/repos/cakephp/migrations/events","assignees_url":"https://api.github.com/repos/cakephp/migrations/assignees{/user}","branches_url":"https://api.github.com/repos/cakephp/migrations/branches{/branch}","tags_url":"https://api.github.com/repos/cakephp/migrations/tags","blobs_url":"https://api.github.com/repos/cakephp/migrations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cakephp/migrations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cakephp/migrations/git/refs{/sha}","trees_url":"https://api.github.com/repos/cakephp/migrations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cakephp/migrations/statuses/{sha}","languages_url":"https://api.github.com/repos/cakephp/migrations/languages","stargazers_url":"https://api.github.com/repos/cakephp/migrations/stargazers","contributors_url":"https://api.github.com/repos/cakephp/migrations/contributors","subscribers_url":"https://api.github.com/repos/cakephp/migrations/subscribers","subscription_url":"https://api.github.com/repos/cakephp/migrations/subscription","commits_url":"https://api.github.com/repos/cakephp/migrations/commits{/sha}","git_commits_url":"https://api.github.com/repos/cakephp/migrations/git/commits{/sha}","comments_url":"https://api.github.com/repos/cakephp/migrations/comments{/number}","issue_comment_url":"https://api.github.com/repos/cakephp/migrations/issues/comments{/number}","contents_url":"https://api.github.com/repos/cakephp/migrations/contents/{+path}","compare_url":"https://api.github.com/repos/cakephp/migrations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cakephp/migrations/merges","archive_url":"https://api.github.com/repos/cakephp/migrations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cakephp/migrations/downloads","issues_url":"https://api.github.com/repos/cakephp/migrations/issues{/number}","pulls_url":"https://api.github.com/repos/cakephp/migrations/pulls{/number}","milestones_url":"https://api.github.com/repos/cakephp/migrations/milestones{/number}","notifications_url":"https://api.github.com/repos/cakephp/migrations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cakephp/migrations/labels{/name}","releases_url":"https://api.github.com/repos/cakephp/migrations/releases{/id}","created_at":"2014-08-23T17:40:26Z","updated_at":"2015-12-28T15:20:01Z","pushed_at":"2016-01-10T12:36:29Z","git_url":"git://github.com/cakephp/migrations.git","ssh_url":"git@github.com:cakephp/migrations.git","clone_url":"https://github.com/cakephp/migrations.git","svn_url":"https://github.com/cakephp/migrations","homepage":null,"size":472,"stargazers_count":63,"watchers_count":63,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":5,"forks":39,"open_issues":5,"watchers":63,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cakephp/migrations/pulls/181"},"html":{"href":"https://github.com/cakephp/migrations/pull/181"},"issue":{"href":"https://api.github.com/repos/cakephp/migrations/issues/181"},"comments":{"href":"https://api.github.com/repos/cakephp/migrations/issues/181/comments"},"review_comments":{"href":"https://api.github.com/repos/cakephp/migrations/pulls/181/comments"},"review_comment":{"href":"https://api.github.com/repos/cakephp/migrations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cakephp/migrations/pulls/181/commits"},"statuses":{"href":"https://api.github.com/repos/cakephp/migrations/statuses/3e003803325e46c37f2c882ebca941fb4cba2341"}}}}