{"action":"opened","number":2165,"pull_request":{"url":"https://api.github.com/repos/laravel/docs/pulls/2165","id":60609608,"html_url":"https://github.com/laravel/docs/pull/2165","diff_url":"https://github.com/laravel/docs/pull/2165.diff","patch_url":"https://github.com/laravel/docs/pull/2165.patch","issue_url":"https://api.github.com/repos/laravel/docs/issues/2165","number":2165,"state":"open","locked":false,"title":"Noting issue with modifying columns where an enum is present in the table","user":{"login":"EricTendian","id":498525,"avatar_url":"https://avatars.githubusercontent.com/u/498525?v=3","gravatar_id":"","url":"https://api.github.com/users/EricTendian","html_url":"https://github.com/EricTendian","followers_url":"https://api.github.com/users/EricTendian/followers","following_url":"https://api.github.com/users/EricTendian/following{/other_user}","gists_url":"https://api.github.com/users/EricTendian/gists{/gist_id}","starred_url":"https://api.github.com/users/EricTendian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricTendian/subscriptions","organizations_url":"https://api.github.com/users/EricTendian/orgs","repos_url":"https://api.github.com/users/EricTendian/repos","events_url":"https://api.github.com/users/EricTendian/events{/privacy}","received_events_url":"https://api.github.com/users/EricTendian/received_events","type":"User","site_admin":false},"body":"### Problem\r\n\r\nWhen a database migration is being run on a table that contains an `enum` data type, and that migration involves modifying a column on the table, the following error occurs while running `php artisan migrate`:\r\n\r\n```\r\n[Doctrine\\DBAL\\DBALException]                                                                    \r\n  Unknown database type enum requested, Doctrine\\DBAL\\Platforms\\MySqlPlatform may not support it.\r\n```\r\n\r\nThe error occurs because when a column is being modified with `->change()`, Doctrine's DBAL package iterates through the columns in the table in order to perform a diff for generating the appropriate `ALTER` statements. The package maps column data types (e.g. MySQL types) to PHP data types, but `enum` does not have a proper mapping and so it fails. Particularly, the [`_getPortableTableColumnDefinition()`](https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php#L105) method is problematic.\r\n\r\nDoctrine has made it clear they will not be supporting enums: https://github.com/doctrine/dbal/pull/2304\r\n\r\n### About the change\r\n\r\nThus, this PR adds documentation making it more clear that columns on tables with an `enum` column cannot be modified. Even if the new migration does not touch the `enum` column, any other columns in that table are unable to be modified. New columns can be added, however, as long as `->change()` is not invoked. This note is particularly important because if an enum was used, old migrations must be altered to turn the `enum()` into `string()`, as well as manually changing from `ENUM` to `VARCHAR` in the table via SQL, all before any changes can be made on the table in subsequent migrations.\r\n\r\nI'm open to any wording adjustments that will further clarify the point.","created_at":"2016-02-25T01:23:48Z","updated_at":"2016-02-25T01:23:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/laravel/docs/pulls/2165/commits","review_comments_url":"https://api.github.com/repos/laravel/docs/pulls/2165/comments","review_comment_url":"https://api.github.com/repos/laravel/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/laravel/docs/issues/2165/comments","statuses_url":"https://api.github.com/repos/laravel/docs/statuses/41a03286a174d53e2ca3f13d2a194be245d45032","head":{"label":"EricTendian:5.2","ref":"5.2","sha":"41a03286a174d53e2ca3f13d2a194be245d45032","user":{"login":"EricTendian","id":498525,"avatar_url":"https://avatars.githubusercontent.com/u/498525?v=3","gravatar_id":"","url":"https://api.github.com/users/EricTendian","html_url":"https://github.com/EricTendian","followers_url":"https://api.github.com/users/EricTendian/followers","following_url":"https://api.github.com/users/EricTendian/following{/other_user}","gists_url":"https://api.github.com/users/EricTendian/gists{/gist_id}","starred_url":"https://api.github.com/users/EricTendian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricTendian/subscriptions","organizations_url":"https://api.github.com/users/EricTendian/orgs","repos_url":"https://api.github.com/users/EricTendian/repos","events_url":"https://api.github.com/users/EricTendian/events{/privacy}","received_events_url":"https://api.github.com/users/EricTendian/received_events","type":"User","site_admin":false},"repo":{"id":52484158,"name":"laravel-docs","full_name":"EricTendian/laravel-docs","owner":{"login":"EricTendian","id":498525,"avatar_url":"https://avatars.githubusercontent.com/u/498525?v=3","gravatar_id":"","url":"https://api.github.com/users/EricTendian","html_url":"https://github.com/EricTendian","followers_url":"https://api.github.com/users/EricTendian/followers","following_url":"https://api.github.com/users/EricTendian/following{/other_user}","gists_url":"https://api.github.com/users/EricTendian/gists{/gist_id}","starred_url":"https://api.github.com/users/EricTendian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricTendian/subscriptions","organizations_url":"https://api.github.com/users/EricTendian/orgs","repos_url":"https://api.github.com/users/EricTendian/repos","events_url":"https://api.github.com/users/EricTendian/events{/privacy}","received_events_url":"https://api.github.com/users/EricTendian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EricTendian/laravel-docs","description":"","fork":true,"url":"https://api.github.com/repos/EricTendian/laravel-docs","forks_url":"https://api.github.com/repos/EricTendian/laravel-docs/forks","keys_url":"https://api.github.com/repos/EricTendian/laravel-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EricTendian/laravel-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EricTendian/laravel-docs/teams","hooks_url":"https://api.github.com/repos/EricTendian/laravel-docs/hooks","issue_events_url":"https://api.github.com/repos/EricTendian/laravel-docs/issues/events{/number}","events_url":"https://api.github.com/repos/EricTendian/laravel-docs/events","assignees_url":"https://api.github.com/repos/EricTendian/laravel-docs/assignees{/user}","branches_url":"https://api.github.com/repos/EricTendian/laravel-docs/branches{/branch}","tags_url":"https://api.github.com/repos/EricTendian/laravel-docs/tags","blobs_url":"https://api.github.com/repos/EricTendian/laravel-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EricTendian/laravel-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EricTendian/laravel-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/EricTendian/laravel-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EricTendian/laravel-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/EricTendian/laravel-docs/languages","stargazers_url":"https://api.github.com/repos/EricTendian/laravel-docs/stargazers","contributors_url":"https://api.github.com/repos/EricTendian/laravel-docs/contributors","subscribers_url":"https://api.github.com/repos/EricTendian/laravel-docs/subscribers","subscription_url":"https://api.github.com/repos/EricTendian/laravel-docs/subscription","commits_url":"https://api.github.com/repos/EricTendian/laravel-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/EricTendian/laravel-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/EricTendian/laravel-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/EricTendian/laravel-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/EricTendian/laravel-docs/contents/{+path}","compare_url":"https://api.github.com/repos/EricTendian/laravel-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EricTendian/laravel-docs/merges","archive_url":"https://api.github.com/repos/EricTendian/laravel-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EricTendian/laravel-docs/downloads","issues_url":"https://api.github.com/repos/EricTendian/laravel-docs/issues{/number}","pulls_url":"https://api.github.com/repos/EricTendian/laravel-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/EricTendian/laravel-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/EricTendian/laravel-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EricTendian/laravel-docs/labels{/name}","releases_url":"https://api.github.com/repos/EricTendian/laravel-docs/releases{/id}","deployments_url":"https://api.github.com/repos/EricTendian/laravel-docs/deployments","created_at":"2016-02-25T00:17:57Z","updated_at":"2016-02-25T00:18:12Z","pushed_at":"2016-02-25T01:22:46Z","git_url":"git://github.com/EricTendian/laravel-docs.git","ssh_url":"git@github.com:EricTendian/laravel-docs.git","clone_url":"https://github.com/EricTendian/laravel-docs.git","svn_url":"https://github.com/EricTendian/laravel-docs","homepage":"","size":4696,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"5.2"}},"base":{"label":"laravel:5.2","ref":"5.2","sha":"58447f43e8a7471808b4c86de3ab21ce1f92db0e","user":{"login":"laravel","id":958072,"avatar_url":"https://avatars.githubusercontent.com/u/958072?v=3","gravatar_id":"","url":"https://api.github.com/users/laravel","html_url":"https://github.com/laravel","followers_url":"https://api.github.com/users/laravel/followers","following_url":"https://api.github.com/users/laravel/following{/other_user}","gists_url":"https://api.github.com/users/laravel/gists{/gist_id}","starred_url":"https://api.github.com/users/laravel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laravel/subscriptions","organizations_url":"https://api.github.com/users/laravel/orgs","repos_url":"https://api.github.com/users/laravel/repos","events_url":"https://api.github.com/users/laravel/events{/privacy}","received_events_url":"https://api.github.com/users/laravel/received_events","type":"Organization","site_admin":false},"repo":{"id":7546847,"name":"docs","full_name":"laravel/docs","owner":{"login":"laravel","id":958072,"avatar_url":"https://avatars.githubusercontent.com/u/958072?v=3","gravatar_id":"","url":"https://api.github.com/users/laravel","html_url":"https://github.com/laravel","followers_url":"https://api.github.com/users/laravel/followers","following_url":"https://api.github.com/users/laravel/following{/other_user}","gists_url":"https://api.github.com/users/laravel/gists{/gist_id}","starred_url":"https://api.github.com/users/laravel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laravel/subscriptions","organizations_url":"https://api.github.com/users/laravel/orgs","repos_url":"https://api.github.com/users/laravel/repos","events_url":"https://api.github.com/users/laravel/events{/privacy}","received_events_url":"https://api.github.com/users/laravel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/laravel/docs","description":"","fork":false,"url":"https://api.github.com/repos/laravel/docs","forks_url":"https://api.github.com/repos/laravel/docs/forks","keys_url":"https://api.github.com/repos/laravel/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laravel/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laravel/docs/teams","hooks_url":"https://api.github.com/repos/laravel/docs/hooks","issue_events_url":"https://api.github.com/repos/laravel/docs/issues/events{/number}","events_url":"https://api.github.com/repos/laravel/docs/events","assignees_url":"https://api.github.com/repos/laravel/docs/assignees{/user}","branches_url":"https://api.github.com/repos/laravel/docs/branches{/branch}","tags_url":"https://api.github.com/repos/laravel/docs/tags","blobs_url":"https://api.github.com/repos/laravel/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laravel/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laravel/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/laravel/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laravel/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/laravel/docs/languages","stargazers_url":"https://api.github.com/repos/laravel/docs/stargazers","contributors_url":"https://api.github.com/repos/laravel/docs/contributors","subscribers_url":"https://api.github.com/repos/laravel/docs/subscribers","subscription_url":"https://api.github.com/repos/laravel/docs/subscription","commits_url":"https://api.github.com/repos/laravel/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/laravel/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/laravel/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/laravel/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/laravel/docs/contents/{+path}","compare_url":"https://api.github.com/repos/laravel/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laravel/docs/merges","archive_url":"https://api.github.com/repos/laravel/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laravel/docs/downloads","issues_url":"https://api.github.com/repos/laravel/docs/issues{/number}","pulls_url":"https://api.github.com/repos/laravel/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/laravel/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/laravel/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laravel/docs/labels{/name}","releases_url":"https://api.github.com/repos/laravel/docs/releases{/id}","deployments_url":"https://api.github.com/repos/laravel/docs/deployments","created_at":"2013-01-10T19:08:45Z","updated_at":"2016-02-22T01:42:35Z","pushed_at":"2016-02-25T01:23:48Z","git_url":"git://github.com/laravel/docs.git","ssh_url":"git@github.com:laravel/docs.git","clone_url":"https://github.com/laravel/docs.git","svn_url":"https://github.com/laravel/docs","homepage":"","size":9222,"stargazers_count":635,"watchers_count":635,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1650,"mirror_url":null,"open_issues_count":52,"forks":1650,"open_issues":52,"watchers":635,"default_branch":"5.2"}},"_links":{"self":{"href":"https://api.github.com/repos/laravel/docs/pulls/2165"},"html":{"href":"https://github.com/laravel/docs/pull/2165"},"issue":{"href":"https://api.github.com/repos/laravel/docs/issues/2165"},"comments":{"href":"https://api.github.com/repos/laravel/docs/issues/2165/comments"},"review_comments":{"href":"https://api.github.com/repos/laravel/docs/pulls/2165/comments"},"review_comment":{"href":"https://api.github.com/repos/laravel/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/laravel/docs/pulls/2165/commits"},"statuses":{"href":"https://api.github.com/repos/laravel/docs/statuses/41a03286a174d53e2ca3f13d2a194be245d45032"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":3,"deletions":1,"changed_files":1}}