{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/migrations/issues/211","repository_url":"https://api.github.com/repos/cakephp/migrations","labels_url":"https://api.github.com/repos/cakephp/migrations/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/migrations/issues/211/comments","events_url":"https://api.github.com/repos/cakephp/migrations/issues/211/events","html_url":"https://github.com/cakephp/migrations/issues/211","id":142050656,"number":211,"title":"Baking snapshot from mysql changes longtext to text","user":{"login":"half2me","id":6759894,"avatar_url":"https://avatars.githubusercontent.com/u/6759894?v=3","gravatar_id":"","url":"https://api.github.com/users/half2me","html_url":"https://github.com/half2me","followers_url":"https://api.github.com/users/half2me/followers","following_url":"https://api.github.com/users/half2me/following{/other_user}","gists_url":"https://api.github.com/users/half2me/gists{/gist_id}","starred_url":"https://api.github.com/users/half2me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/half2me/subscriptions","organizations_url":"https://api.github.com/users/half2me/orgs","repos_url":"https://api.github.com/users/half2me/repos","events_url":"https://api.github.com/users/half2me/events{/privacy}","received_events_url":"https://api.github.com/users/half2me/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/migrations/labels/On%20hold","name":"On hold","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/migrations/milestones/29","html_url":"https://github.com/cakephp/migrations/milestones/1.6.2","labels_url":"https://api.github.com/repos/cakephp/migrations/milestones/29/labels","id":1783640,"number":29,"title":"1.6.2","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":8,"closed_issues":3,"state":"open","created_at":"2016-05-23T20:54:41Z","updated_at":"2016-05-26T19:54:17Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-03-19T10:40:06Z","updated_at":"2016-05-26T19:54:17Z","closed_at":"2016-05-26T19:54:17Z","body":"This is a (multiple allowed):\r\n* [x] bug\r\n\r\n* CakePHP Version: 3.2.5\r\n* Migrations plugin version: 1.5.7\r\n* Bake plugin version (if relevant): 1.2.3\r\n* Database server MySQL 5.7.10\r\n* PHP Version: 5.6.18\r\n* Platform / OS: OSX 10.11\r\n\r\n### What you did\r\nI baked a snapshot of my database. I have a field called `data` with `LONGTEXT` type\r\n`bin/cake bake migration_snapshot longtextdata --plugin Queue`\r\n\r\n### Expected Behavior\r\nI would expect the output to have type TEXT, with the limit option set.\r\n\r\n### Actual Behavior\r\nI get the following (limit is null):\r\n```php\r\n->addColumn('data', 'text', [\r\n                'default' => null,\r\n                'limit' => null,\r\n                'null' => true,\r\n            ])\r\n```\r\n\r\nWhen I use migrations to setup a new database, `LONGTEXT` type is not set, but `TEXT` is used instead. This way when I want to save long text data, the end gets cut off.\r\n\r\nThe `limit` should be set like this: https://stackoverflow.com/questions/4443477/rails-3-migration-with-longtext"},"comment":{"url":"https://api.github.com/repos/cakephp/migrations/issues/comments/221976456","html_url":"https://github.com/cakephp/migrations/issues/211#issuecomment-221976456","issue_url":"https://api.github.com/repos/cakephp/migrations/issues/211","id":221976456,"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},"created_at":"2016-05-26T19:54:16Z","updated_at":"2016-05-26T19:54:16Z","body":"I tested again since 3.2.7 was released including the necessary improvements in the Schema management classes and it now properly works (see https://github.com/cakephp/cakephp/pull/8543 and https://github.com/cakephp/cakephp/pull/8605)\r\n\r\nThe thing to know is that it will use a type ``text`` whatever the length is and will use a constant value from the ``Schema\\Table`` class matching the length. These values are the same as phinx so it will not lose its marbles when migrating : it will create the proper column type (whether long, medium or tiny)."}}
{"actor":{"display_login":"HavokInspiration"}}