{"action":"opened","issue":{"url":"https://api.github.com/repos/contao/contao/issues/57","repository_url":"https://api.github.com/repos/contao/contao","labels_url":"https://api.github.com/repos/contao/contao/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/contao/contao/issues/57/comments","events_url":"https://api.github.com/repos/contao/contao/issues/57/events","html_url":"https://github.com/contao/contao/issues/57","id":359787041,"node_id":"MDU6SXNzdWUzNTk3ODcwNDE=","number":57,"title":"Default setting of type text is ignored","user":{"login":"dmolineus","id":1186266,"node_id":"MDQ6VXNlcjExODYyNjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1186266?v=4","gravatar_id":"","url":"https://api.github.com/users/dmolineus","html_url":"https://github.com/dmolineus","followers_url":"https://api.github.com/users/dmolineus/followers","following_url":"https://api.github.com/users/dmolineus/following{/other_user}","gists_url":"https://api.github.com/users/dmolineus/gists{/gist_id}","starred_url":"https://api.github.com/users/dmolineus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmolineus/subscriptions","organizations_url":"https://api.github.com/users/dmolineus/orgs","repos_url":"https://api.github.com/users/dmolineus/repos","events_url":"https://api.github.com/users/dmolineus/events{/privacy}","received_events_url":"https://api.github.com/users/dmolineus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-13T08:08:52Z","updated_at":"2018-09-13T08:08:52Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Affected version(s)**\r\n \r\n- LTS 4.4 \r\n- 4.6 not tested\r\n\r\n**Description**  \r\nIf you use the new array syntax to define an sql type for a text field, no default value is set in the sql satement even if it's defined in the config\r\n\r\n```php\r\n'sql' => ['type' => 'text', 'default' => null]\r\n```\r\n\r\nThe created sql statement is:\r\n\r\n```\r\nALTER TABLE tl_example ADD content2 LONGTEXT NOT NULL\r\n```\r\nThis leads to an exception if mysql is run in mode `STRICT_TRANS_TABLES`.\r\n\r\n**How to reproduce**  \r\n\r\n1. Run Mysql in mode `STRICT_TRANS_TABLES`\r\n2. Define a new text field in a dca definition with the sql statement mentioned above\r\n3. Update database with the install tool\r\n4. Try to create a new entry using the backend.\r\n"}}
{"actor":{"display_login":"dmolineus"}}