{"action":"created","issue":{"url":"https://api.github.com/repos/dimitri/pgloader/issues/326","labels_url":"https://api.github.com/repos/dimitri/pgloader/issues/326/labels{/name}","comments_url":"https://api.github.com/repos/dimitri/pgloader/issues/326/comments","events_url":"https://api.github.com/repos/dimitri/pgloader/issues/326/events","html_url":"https://github.com/dimitri/pgloader/issues/326","id":127189963,"number":326,"title":"casting enums","user":{"login":"traufeisen","id":2385240,"avatar_url":"https://avatars.githubusercontent.com/u/2385240?v=3","gravatar_id":"","url":"https://api.github.com/users/traufeisen","html_url":"https://github.com/traufeisen","followers_url":"https://api.github.com/users/traufeisen/followers","following_url":"https://api.github.com/users/traufeisen/following{/other_user}","gists_url":"https://api.github.com/users/traufeisen/gists{/gist_id}","starred_url":"https://api.github.com/users/traufeisen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traufeisen/subscriptions","organizations_url":"https://api.github.com/users/traufeisen/orgs","repos_url":"https://api.github.com/users/traufeisen/repos","events_url":"https://api.github.com/users/traufeisen/events{/privacy}","received_events_url":"https://api.github.com/users/traufeisen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-18T09:50:05Z","updated_at":"2016-01-18T14:08:42Z","closed_at":null,"body":"Hello,\r\nit seems not possible to apply a casting rule to all enum columns in a mysql database.\r\nIt would be very useful to define something like this in the config file:\r\n\r\n```\r\nCAST type enum drop not null using empty-string-to-null\r\n```\r\n\r\nHowever, when I do this now, pgloader tries to create a table like this:\r\n\r\n```\r\nCREATE TABLE foo\r\n(\r\n  bar     enum default 'no'\r\n);\r\n```"},"comment":{"url":"https://api.github.com/repos/dimitri/pgloader/issues/comments/172535024","html_url":"https://github.com/dimitri/pgloader/issues/326#issuecomment-172535024","issue_url":"https://api.github.com/repos/dimitri/pgloader/issues/326","id":172535024,"user":{"login":"dimitri","id":102900,"avatar_url":"https://avatars.githubusercontent.com/u/102900?v=3","gravatar_id":"","url":"https://api.github.com/users/dimitri","html_url":"https://github.com/dimitri","followers_url":"https://api.github.com/users/dimitri/followers","following_url":"https://api.github.com/users/dimitri/following{/other_user}","gists_url":"https://api.github.com/users/dimitri/gists{/gist_id}","starred_url":"https://api.github.com/users/dimitri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimitri/subscriptions","organizations_url":"https://api.github.com/users/dimitri/orgs","repos_url":"https://api.github.com/users/dimitri/repos","events_url":"https://api.github.com/users/dimitri/events{/privacy}","received_events_url":"https://api.github.com/users/dimitri/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T14:08:42Z","updated_at":"2016-01-18T14:08:42Z","body":"IS it good enough for you? I guess we could avoid creating the enums then, maybe they serve as “documentation” but maybe it is just me being lazy now ;-)"}}